xpa 4.7 - combining multiple pdf


Tom Worthen
 

Is anyone aware of a method to combine multiple pdf’s into 1?

 

I have a situation where we are generating labels as pdf’s but we need to combine multiples into a single pdf.

 

I have attempted tried several different approaches and nothing has worked as of yet.

 

Any ideas would be appreciated.

 

Thanks,

Tom


Frederik Soete
 

Ghostscript ok?

If you convert a series of pdf into a series of postscript (ghostscript's pdf2ps.bat), then concatenate the postscript into one single postscript (putting the contents of each file one after another), then convert the end result to pdf (ghostscript's ps2pdf.bat), you should get a pdf containing the original pages.

HTH,

Frederik Soete

Op di 21 sep. 2021 19:18 schreef Tom Worthen <tworthen@...>:

Is anyone aware of a method to combine multiple pdf’s into 1?

 

I have a situation where we are generating labels as pdf’s but we need to combine multiples into a single pdf.

 

I have attempted tried several different approaches and nothing has worked as of yet.

 

Any ideas would be appreciated.

 

Thanks,

Tom


Wes Hein
 

My original reply didn't go through so if it does later ignore it!

Write a batch task that calls the print programs, create an I/O file with it's unique Name.  Add a parameter to each of the print jobs to receive that I/O name.  In the I/O properties of each print program, use this parameter in the 'I/O name to use:'.

This way all the print jobs can go to one PDF

Wes


Tom Worthen
 

Maybe I should have given more information. These are base64 fields that contain pdfs. I can use the BlobFromBase64 and this gives me a blob with the pdf in it. I have proved that by doing a blb2file with that result and I can open the file saved as a pdf. I have attempted to combine the fields and do a BlobFromBase64 on that and the result adobe will not open. I have attempted to use BlobFromBase64 and then use blb2file with the 2 blobs concatenated and adobe also refuses to open that result.

 

Frederik, if I understand what you are suggesting is to use ghostscripts different bat files to change the pdfs into postscript files, then concatenate those and then use their bat file to convert that result back to a pdf? If this what you are suggesting?

 

We have used ghostscript in the past to create pdf’s but I was unaware they had a tool to go the other direction.

 

Are those bat files included with the standard install of ghostscript?

 

Thanks,

Tom

 

 

From: main@magicu-l.groups.io [mailto:main@magicu-l.groups.io] On Behalf Of Frederik Soete
Sent: Tuesday, September 21, 2021 1:39 PM
To: main@magicu-l.groups.io
Subject: Re: [magicu-l] xpa 4.7 - combining multiple pdf

 

Ghostscript ok?

 

If you convert a series of pdf into a series of postscript (ghostscript's pdf2ps.bat), then concatenate the postscript into one single postscript (putting the contents of each file one after another), then convert the end result to pdf (ghostscript's ps2pdf.bat), you should get a pdf containing the original pages.

 

HTH,

 

Frederik Soete

Op di 21 sep. 2021 19:18 schreef Tom Worthen <tworthen@...>:

Is anyone aware of a method to combine multiple pdf’s into 1?

 

I have a situation where we are generating labels as pdf’s but we need to combine multiples into a single pdf.

 

I have attempted tried several different approaches and nothing has worked as of yet.

 

Any ideas would be appreciated.

 

Thanks,

Tom


sherman levine
 

Have you looked at PDFTK or similar command-line tools, for example


Sherm

On 9/21/2021 3:17 PM, Tom Worthen wrote:

Maybe I should have given more information. These are base64 fields that contain pdfs. I can use the BlobFromBase64 and this gives me a blob with the pdf in it. I have proved that by doing a blb2file with that result and I can open the file saved as a pdf. I have attempted to combine the fields and do a BlobFromBase64 on that and the result adobe will not open. I have attempted to use BlobFromBase64 and then use blb2file with the 2 blobs concatenated and adobe also refuses to open that result.

 

Frederik, if I understand what you are suggesting is to use ghostscripts different bat files to change the pdfs into postscript files, then concatenate those and then use their bat file to convert that result back to a pdf? If this what you are suggesting?

 

We have used ghostscript in the past to create pdf’s but I was unaware they had a tool to go the other direction.

 

Are those bat files included with the standard install of ghostscript?

 

Thanks,

Tom

 

 

From: main@magicu-l.groups.io [mailto:main@magicu-l.groups.io] On Behalf Of Frederik Soete
Sent: Tuesday, September 21, 2021 1:39 PM
To: main@magicu-l.groups.io
Subject: Re: [magicu-l] xpa 4.7 - combining multiple pdf

 

Ghostscript ok?

 

If you convert a series of pdf into a series of postscript (ghostscript's pdf2ps.bat), then concatenate the postscript into one single postscript (putting the contents of each file one after another), then convert the end result to pdf (ghostscript's ps2pdf.bat), you should get a pdf containing the original pages.

 

HTH,

 

Frederik Soete

Op di 21 sep. 2021 19:18 schreef Tom Worthen <tworthen@...>:

Is anyone aware of a method to combine multiple pdf’s into 1?

 

I have a situation where we are generating labels as pdf’s but we need to combine multiples into a single pdf.

 

I have attempted tried several different approaches and nothing has worked as of yet.

 

Any ideas would be appreciated.

 

Thanks,

Tom



Frederik Soete
 

Hi Tom,

You have understood my meaning. Concatenation does work for postscript files. This way you can even merge portrait and landscape orientations into one pdf, while displaying them as intended (i.e. landscape is not forced to portrait).

Both batch files pdf2ps.bat and ps2pdf.bat should be present in a ghostscript install.

Bye,

Frederik Soete


Op di 21 sep. 2021 21:18 schreef Tom Worthen <tworthen@...>:

Maybe I should have given more information. These are base64 fields that contain pdfs. I can use the BlobFromBase64 and this gives me a blob with the pdf in it. I have proved that by doing a blb2file with that result and I can open the file saved as a pdf. I have attempted to combine the fields and do a BlobFromBase64 on that and the result adobe will not open. I have attempted to use BlobFromBase64 and then use blb2file with the 2 blobs concatenated and adobe also refuses to open that result.

 

Frederik, if I understand what you are suggesting is to use ghostscripts different bat files to change the pdfs into postscript files, then concatenate those and then use their bat file to convert that result back to a pdf? If this what you are suggesting?

 

We have used ghostscript in the past to create pdf’s but I was unaware they had a tool to go the other direction.

 

Are those bat files included with the standard install of ghostscript?

 

Thanks,

Tom

 

 

From: main@magicu-l.groups.io [mailto:main@magicu-l.groups.io] On Behalf Of Frederik Soete
Sent: Tuesday, September 21, 2021 1:39 PM
To: main@magicu-l.groups.io
Subject: Re: [magicu-l] xpa 4.7 - combining multiple pdf

 

Ghostscript ok?

 

If you convert a series of pdf into a series of postscript (ghostscript's pdf2ps.bat), then concatenate the postscript into one single postscript (putting the contents of each file one after another), then convert the end result to pdf (ghostscript's ps2pdf.bat), you should get a pdf containing the original pages.

 

HTH,

 

Frederik Soete

Op di 21 sep. 2021 19:18 schreef Tom Worthen <tworthen@...>:

Is anyone aware of a method to combine multiple pdf’s into 1?

 

I have a situation where we are generating labels as pdf’s but we need to combine multiples into a single pdf.

 

I have attempted tried several different approaches and nothing has worked as of yet.

 

Any ideas would be appreciated.

 

Thanks,

Tom


Olivier Besson
 

Hi Tom,

I use PDFTK too. Very easy command line tool, no installation requested


Olivier


De Netwerkadviseur BV
 

Hi Tom,

You can use PDFTK or QPDF for this.

If you want to do it within XPA, you can use for example Telerik PDF libraries.

Kind regards,
André


Mike McMillin
 

Tom,
Like others we use PDFTK.  We create a Submittal Report that can have hundreds of individual Product Data Sheets, Material Safety Data Sheets and reports generated in Magic.  It has been working for over ten years in 3 version of Magic without any problems.

Mike McMillin


Tom Worthen
 

Sherm,

 

PDFTK is exactly what I was looking for. I believe a couple of other individuals mentioned they are using it also. It is always good to know others using Magic/uniPaaS/xpa are using the same thing.

 

Thanks,

Tom

 

From: main@magicu-l.groups.io [mailto:main@magicu-l.groups.io] On Behalf Of sherman levine
Sent: Tuesday, September 21, 2021 3:46 PM
To: main@magicu-l.groups.io
Subject: Re: [magicu-l] xpa 4.7 - combining multiple pdf

 

Have you looked at PDFTK or similar command-line tools, for example

 

 

Sherm

 

On 9/21/2021 3:17 PM, Tom Worthen wrote:

Maybe I should have given more information. These are base64 fields that contain pdfs. I can use the BlobFromBase64 and this gives me a blob with the pdf in it. I have proved that by doing a blb2file with that result and I can open the file saved as a pdf. I have attempted to combine the fields and do a BlobFromBase64 on that and the result adobe will not open. I have attempted to use BlobFromBase64 and then use blb2file with the 2 blobs concatenated and adobe also refuses to open that result.

 

Frederik, if I understand what you are suggesting is to use ghostscripts different bat files to change the pdfs into postscript files, then concatenate those and then use their bat file to convert that result back to a pdf? If this what you are suggesting?

 

We have used ghostscript in the past to create pdf’s but I was unaware they had a tool to go the other direction.

 

Are those bat files included with the standard install of ghostscript?

 

Thanks,

Tom

 

 

From: main@magicu-l.groups.io [mailto:main@magicu-l.groups.io] On Behalf Of Frederik Soete
Sent: Tuesday, September 21, 2021 1:39 PM
To: main@magicu-l.groups.io
Subject: Re: [magicu-l] xpa 4.7 - combining multiple pdf

 

Ghostscript ok?

 

If you convert a series of pdf into a series of postscript (ghostscript's pdf2ps.bat), then concatenate the postscript into one single postscript (putting the contents of each file one after another), then convert the end result to pdf (ghostscript's ps2pdf.bat), you should get a pdf containing the original pages.

 

HTH,

 

Frederik Soete

Op di 21 sep. 2021 19:18 schreef Tom Worthen <tworthen@...>:

Is anyone aware of a method to combine multiple pdf’s into 1?

 

I have a situation where we are generating labels as pdf’s but we need to combine multiples into a single pdf.

 

I have attempted tried several different approaches and nothing has worked as of yet.

 

Any ideas would be appreciated.

 

Thanks,

Tom