pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maruan Sahyoun <sahy...@fileaffairs.de>
Subject Re: Issue with PDFBox 'Overlay' and Headers/Footers
Date Fri, 02 Aug 2013 08:41:07 GMT
Hi Robert,

is it possible to upload the PDFs to a public location as they didn't make it through the
mailing list?


Maruan Sahyoun

Am 02.08.2013 um 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
>             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,
> Regards,
> Robert Page
> Lead Developer - Strategic Core Development
> open gi
> Buckholt Drive, Warndon, Worcester WR4 9SR
> Tel: +44 (0)1905 754455 Ext: 2154
> Fax: +44 (0)1905 754441
> Email: robert.page@opengi.co.uk
> Web: www.opengi.co.uk
> powering broker business for 30 years
> Please consider the environment before printing this e-mail
> "This message is intended for the named recipient only and may be privileged and/or confidential.
If you are not the intended or named recipient or have received this email in error then you
should not copy forward or disclose it to any other persons. If you have received this email
in error you should destroy it and contact the sender so that we may take appropriate action.
The views and opinions expressed in this email may not represent the views and opinions of
Open International Limited or any of its subsidiaries and are made without prejudice and subject
to contract. The Company Reserves the right to intercept and review all email communications."
> Open International Limited. Registered Office: Buckholt Drive, Warndon, Worcester, WR4
> Registered in England. Registered No: 05716519

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message