You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by "Campbell, Lance" <la...@illinois.edu> on 2013/01/28 18:07:55 UTC

how to merge PDFs

FOP 1.1
We have been using FOP for quite a few years now.  We are really happy with it.  We use it to generate PDF reports.  We seem to be running into an issue where really large reports start to display the XSL-FOP code in the output.

Example:
d="submission-4"> <fo:static-content flow-name="xsl-region-after"> <fo:table> <fs week? If so,
provide details on the conference/workshop/journal, authors, paper

I was thinking that maybe I could process each page into its own PDF and then splice the single page PDFs together into a master PDF document.

Has anyone ever done this?

This will prevent the issue from occurring.


Thanks,

Lance Campbell
Software Architect
Web Services at Public Affairs
217-333-0382


Re: how to merge PDFs

Posted by Marc <Ma...@free.fr>.
Hi,
If you cut the output into different section, each section is 
suppressed from the memory at the end.
This is not possible if you have link between the differents sections.

I do this in a project to generate very big pdf file with a small java 
machine.

Marc

Le lundi 28 janvier 2013 21:42:17, Campbell, Lance a écrit :
> I looked over the PDFBox option.  Do you believe there is a way to
> renumber pages in a merged PDF document?
>
> Thanks,
>
> Lance Campbell
>
> Software Architect
>
> Web Services at Public Affairs
>
> 217-333-0382
>
> University of Illinois at Urbana-Champaign logo <http://illinois.edu/>
>
> *From:*Mehdi Houshmand [mailto:med1985@gmail.com]
> *Sent:* Monday, January 28, 2013 2:02 PM
> *To:* fop-users@xmlgraphics.apache.org
> *Subject:* Re: how to merge PDFs
>
> Look into PDFBox, its another Apache project that can do just that.
> However, you definitely shouldn't be seeing XSL-FO in the output PDF.
>
> Can you post a bug and attach a test sample? Depending on what you're
> doing, FOP should be able to handle big documents so the merging
> shouldn't be necessary.
>
> On Jan 28, 2013 5:08 PM, "Campbell, Lance" <lance@illinois.edu
> <ma...@illinois.edu>> wrote:
>
> FOP 1.1
>
> We have been using FOP for quite a few years now.  We are really happy
> with it.  We use it to generate PDF reports.  We seem to be running
> into an issue where really large reports start to display the XSL-FOP
> code in the output.
>
> Example:
>
> d="submission-4"> <fo:static-content flow-name="xsl-region-after">
> <fo:table> <fs week? If so,
>
> provide details on the conference/workshop/journal, authors, paper
>
> I was thinking that maybe I could process each page into its own PDF
> and then splice the single page PDFs together into a master PDF document.
>
> Has anyone ever done this?
>
> This will prevent the issue from occurring.
>
> Thanks,
>
> Lance Campbell
>
> Software Architect
>
> Web Services at Public Affairs
>
> 217-333-0382
>

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: how to merge PDFs

Posted by Chris Bowditch <bo...@hotmail.com>.
Hi,

A  better approach to merging multiple PDF files together is to use the 
Intermediate Format. So instead of transforming each separate File 
FO->PDF directly, tranform FO->IF and then once you have all the 
separate IF Files you can merge them into one large PDF File. If you try 
to do that with PDFBox or similar you will be constrained by memory as 
those tools have to load the entire PDF data into an object model inside 
the process. We can generate 10s of thousands of pages using this 
technique and you can resequence the page numbers with a few minor 
tweaks to the XML as you load the files in, rather than having to 
manipulate PDF Text to achieve this.

Take a look at the Java code example 
\examples\embedding\java\embedding\intermediate\ExampleConcat.java to 
see how to achieve what I'm describing.

Thanks,

Chris

On 29/01/2013 15:30, Campbell, Lance wrote:
>
> Thanks for your suggestion on submitting a bug.  I put together the 
> information to recreate the problem as well as the PDF that was in 
> error.  I submitted it just now.
>
> I think I will skip the merge and wait to hear back from the bug 
> submission.
>
> Thanks,
>
> Lance Campbell
>
> Software Architect
>
> Web Services at Public Affairs
>
> 217-333-0382
>
> University of Illinois at Urbana-Champaign logo <http://illinois.edu/>
>
> *From:*Luis Bernardo [mailto:lmpmbernardo@gmail.com]
> *Sent:* Monday, January 28, 2013 5:00 PM
> *To:* fop-users@xmlgraphics.apache.org
> *Subject:* Re: how to merge PDFs
>
>
> Please provide a test case if you think you found a bug. Most likely 
> there is some oddity in your FO input that causes the problem.
>
> If you want to merge documents and have control over how they are 
> generated you can use initial-page-number to set the page number for 
> the start of a page sequence.
>
> To merge, besides PDFBox you can use pdftk (which itself uses iText).
>
> On 1/28/13 8:42 PM, Campbell, Lance wrote:
>
>     I looked over the PDFBox option.  Do you believe there is a way to
>     renumber pages in a merged PDF document?
>
>     Thanks,
>
>     Lance Campbell
>
>     Software Architect
>
>     Web Services at Public Affairs
>
>     217-333-0382
>
>     University of Illinois at Urbana-Champaign logo <http://illinois.edu/>
>
>     *From:*Mehdi Houshmand [mailto:med1985@gmail.com]
>     *Sent:* Monday, January 28, 2013 2:02 PM
>     *To:* fop-users@xmlgraphics.apache.org
>     <ma...@xmlgraphics.apache.org>
>     *Subject:* Re: how to merge PDFs
>
>     Look into PDFBox, its another Apache project that can do just
>     that. However, you definitely shouldn't be seeing XSL-FO in the
>     output PDF.
>
>     Can you post a bug and attach a test sample? Depending on what
>     you're doing, FOP should be able to handle big documents so the
>     merging shouldn't be necessary.
>
>     On Jan 28, 2013 5:08 PM, "Campbell, Lance" <lance@illinois.edu
>     <ma...@illinois.edu>> wrote:
>
>     FOP 1.1
>
>     We have been using FOP for quite a few years now.  We are really
>     happy with it.  We use it to generate PDF reports.  We seem to be
>     running into an issue where really large reports start to display
>     the XSL-FOP code in the output.
>
>     Example:
>
>     d="submission-4"> <fo:static-content flow-name="xsl-region-after">
>     <fo:table> <fs week? If so,
>
>     provide details on the conference/workshop/journal, authors, paper
>
>     I was thinking that maybe I could process each page into its own
>     PDF and then splice the single page PDFs together into a master
>     PDF document.
>
>     Has anyone ever done this?
>
>     This will prevent the issue from occurring.
>
>     Thanks,
>
>     Lance Campbell
>
>     Software Architect
>
>     Web Services at Public Affairs
>
>     217-333-0382
>


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


RE: how to merge PDFs

Posted by "Campbell, Lance" <la...@illinois.edu>.
Thanks for your suggestion on submitting a bug.  I put together the information to recreate the problem as well as the PDF that was in error.  I submitted it just now.

I think I will skip the merge and wait to hear back from the bug submission.


Thanks,

Lance Campbell
Software Architect
Web Services at Public Affairs
217-333-0382
[University of Illinois at Urbana-Champaign logo]<http://illinois.edu/>


From: Luis Bernardo [mailto:lmpmbernardo@gmail.com]
Sent: Monday, January 28, 2013 5:00 PM
To: fop-users@xmlgraphics.apache.org
Subject: Re: how to merge PDFs


Please provide a test case if you think you found a bug. Most likely there is some oddity in your FO input that causes the problem.

If you want to merge documents and have control over how they are generated you can use initial-page-number to set the page number for the start of a page sequence.

To merge, besides PDFBox you can use pdftk (which itself uses iText).

On 1/28/13 8:42 PM, Campbell, Lance wrote:
I looked over the PDFBox option.  Do you believe there is a way to renumber pages in a merged PDF document?


Thanks,

Lance Campbell
Software Architect
Web Services at Public Affairs
217-333-0382
[University of Illinois at Urbana-Champaign logo]<http://illinois.edu/>


From: Mehdi Houshmand [mailto:med1985@gmail.com]
Sent: Monday, January 28, 2013 2:02 PM
To: fop-users@xmlgraphics.apache.org<ma...@xmlgraphics.apache.org>
Subject: Re: how to merge PDFs


Look into PDFBox, its another Apache project that can do just that. However, you definitely shouldn't be seeing XSL-FO in the output PDF.

Can you post a bug and attach a test sample? Depending on what you're doing, FOP should be able to handle big documents so the merging shouldn't be necessary.
On Jan 28, 2013 5:08 PM, "Campbell, Lance" <la...@illinois.edu>> wrote:
FOP 1.1
We have been using FOP for quite a few years now.  We are really happy with it.  We use it to generate PDF reports.  We seem to be running into an issue where really large reports start to display the XSL-FOP code in the output.

Example:
d="submission-4"> <fo:static-content flow-name="xsl-region-after"> <fo:table> <fs week? If so,
provide details on the conference/workshop/journal, authors, paper

I was thinking that maybe I could process each page into its own PDF and then splice the single page PDFs together into a master PDF document.

Has anyone ever done this?

This will prevent the issue from occurring.


Thanks,

Lance Campbell
Software Architect
Web Services at Public Affairs
217-333-0382



Re: how to merge PDFs

Posted by Luis Bernardo <lm...@gmail.com>.
Please provide a test case if you think you found a bug. Most likely 
there is some oddity in your FO input that causes the problem.

If you want to merge documents and have control over how they are 
generated you can use initial-page-number to set the page number for the 
start of a page sequence.

To merge, besides PDFBox you can use pdftk (which itself uses iText).

On 1/28/13 8:42 PM, Campbell, Lance wrote:
>
> I looked over the PDFBox option.  Do you believe there is a way to 
> renumber pages in a merged PDF document?
>
> Thanks,
>
> Lance Campbell
>
> Software Architect
>
> Web Services at Public Affairs
>
> 217-333-0382
>
> University of Illinois at Urbana-Champaign logo <http://illinois.edu/>
>
> *From:*Mehdi Houshmand [mailto:med1985@gmail.com]
> *Sent:* Monday, January 28, 2013 2:02 PM
> *To:* fop-users@xmlgraphics.apache.org
> *Subject:* Re: how to merge PDFs
>
> Look into PDFBox, its another Apache project that can do just that. 
> However, you definitely shouldn't be seeing XSL-FO in the output PDF.
>
> Can you post a bug and attach a test sample? Depending on what you're 
> doing, FOP should be able to handle big documents so the merging 
> shouldn't be necessary.
>
> On Jan 28, 2013 5:08 PM, "Campbell, Lance" <lance@illinois.edu 
> <ma...@illinois.edu>> wrote:
>
> FOP 1.1
>
> We have been using FOP for quite a few years now.  We are really happy 
> with it.  We use it to generate PDF reports.  We seem to be running 
> into an issue where really large reports start to display the XSL-FOP 
> code in the output.
>
> Example:
>
> d="submission-4"> <fo:static-content flow-name="xsl-region-after"> 
> <fo:table> <fs week? If so,
>
> provide details on the conference/workshop/journal, authors, paper
>
> I was thinking that maybe I could process each page into its own PDF 
> and then splice the single page PDFs together into a master PDF document.
>
> Has anyone ever done this?
>
> This will prevent the issue from occurring.
>
> Thanks,
>
> Lance Campbell
>
> Software Architect
>
> Web Services at Public Affairs
>
> 217-333-0382
>


RE: how to merge PDFs

Posted by "Campbell, Lance" <la...@illinois.edu>.
I looked over the PDFBox option.  Do you believe there is a way to renumber pages in a merged PDF document?


Thanks,

Lance Campbell
Software Architect
Web Services at Public Affairs
217-333-0382
[University of Illinois at Urbana-Champaign logo]<http://illinois.edu/>


From: Mehdi Houshmand [mailto:med1985@gmail.com]
Sent: Monday, January 28, 2013 2:02 PM
To: fop-users@xmlgraphics.apache.org
Subject: Re: how to merge PDFs


Look into PDFBox, its another Apache project that can do just that. However, you definitely shouldn't be seeing XSL-FO in the output PDF.

Can you post a bug and attach a test sample? Depending on what you're doing, FOP should be able to handle big documents so the merging shouldn't be necessary.
On Jan 28, 2013 5:08 PM, "Campbell, Lance" <la...@illinois.edu>> wrote:
FOP 1.1
We have been using FOP for quite a few years now.  We are really happy with it.  We use it to generate PDF reports.  We seem to be running into an issue where really large reports start to display the XSL-FOP code in the output.

Example:
d="submission-4"> <fo:static-content flow-name="xsl-region-after"> <fo:table> <fs week? If so,
provide details on the conference/workshop/journal, authors, paper

I was thinking that maybe I could process each page into its own PDF and then splice the single page PDFs together into a master PDF document.

Has anyone ever done this?

This will prevent the issue from occurring.


Thanks,

Lance Campbell
Software Architect
Web Services at Public Affairs
217-333-0382


Re: how to merge PDFs

Posted by Mehdi Houshmand <me...@gmail.com>.
Look into PDFBox, its another Apache project that can do just that.
However, you definitely shouldn't be seeing XSL-FO in the output PDF.

Can you post a bug and attach a test sample? Depending on what you're
doing, FOP should be able to handle big documents so the merging shouldn't
be necessary.
On Jan 28, 2013 5:08 PM, "Campbell, Lance" <la...@illinois.edu> wrote:

>  FOP 1.1****
>
> We have been using FOP for quite a few years now.  We are really happy
> with it.  We use it to generate PDF reports.  We seem to be running into an
> issue where really large reports start to display the XSL-FOP code in the
> output.****
>
> ** **
>
> Example:****
>
> d="submission-4"> <fo:static-content flow-name="xsl-region-after">
> <fo:table> <fs week? If so,****
>
> provide details on the conference/workshop/journal, authors, paper****
>
> ** **
>
> I was thinking that maybe I could process each page into its own PDF and
> then splice the single page PDFs together into a master PDF document.  ***
> *
>
> ** **
>
> Has anyone ever done this?  ****
>
> ** **
>
> This will prevent the issue from occurring.****
>
> ** **
>
> ** **
>
> Thanks,****
>
> ** **
>
> Lance Campbell****
>
> Software Architect****
>
> Web Services at Public Affairs****
>
> 217-333-0382****
>
> ** **
>