pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Lehmkuehler <andr...@lehmi.de>
Subject Re: FW: Issue with PDFBox 'Overlay' and Headers/Footers
Date Sat, 03 Aug 2013 14:48:59 GMT
Hi,

Am 02.08.2013 10:17, schrieb Robert.Page@opengi.co.uk:
> Hi,
>
> I’m experiencing an issue with overlaying PDFs using PDFBox 1.8.2.
>
> I’m generating a (‘Source’) PDF via MS Word. When subsequently using the
> ‘Overlay’ class to place this source PDF onto another (‘Stationery’) PDF, the
> resulting PDF doesn’t appear to contain any of the contents of the ‘Source’ PDF
> – it only appears to contain the content from the ‘Stationery’ PDF itself.
>
> The issue only appears to be prevalent when the original MS Word document
> contains header/footer content – my original ‘Source’ Word document contains a
> header.
>
> I’m including the following sample code to indicate how I’m using PDFBox to
> overlay the PDFs. Note: The sample code is C# - I can reproduce the same
> symptoms when using Java code.
>
>              PDDocument sourcePDF = PDDocument.load(@"C:\1work\Source.pdf");
>
>              PDDocument stationeryPDF = PDDocument.load(@"C:\1work\Stationery.pdf");
>
>              // Overlay the stationery document over the main document...
>
>              Overlay pdfOverlay = new Overlay();
>
>              PDDocument outputPDF = pdfOverlay.overlay(sourcePDF, stationeryPDF);
>
>              // Save the document resulting from 'overlay'...
>
>              outputPDF.save(@"C:\1work\Output.pdf");
>
>              // Close the documents...
>
>              stationeryPDF.close();
>
>              sourcePDF.close();
>
>              outputPDF.close();
>
> I’ve attached the two PDFs used in this sample.
>
> Any help gratefully received,
Did you ever try the improved overlay-tool? See [1] for further details.
I guess the old one will be removed in PDFBox 2.0

> Regards,
>
> *Robert Page*
>SNIP

BR
Andreas Lehmkühler

[1] https://issues.apache.org/jira/browse/PDFBOX-1514


Mime
View raw message