PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Tue Apr 23, 2024 7:16 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Thu May 24, 2007 9:04 pm 
Offline

Joined: Thu May 24, 2007 8:53 pm
Posts: 1
Hi,

I need to place two pdf documents over each other. I have a pdf (invoice with company header and footer) and another pdf with document data. Is it possible to place the invoice in the background and the other pdf over the invoice so I can see both pages ? I know that the pdf standard supports this feature, it is used for example in 'pdfbox', a java lib for creating and manipulating pdfs. Another requirement is that the resulting pdf must be editable, so I can't use image overlay.

Greetings,

EdWin


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Jun 19, 2007 6:47 am 
Offline

Joined: Tue Feb 20, 2007 1:36 pm
Posts: 8
Hi EdWin,
you simply create a New PdfDocument and add a page to it. Then you declare XPdfForm.FromFile(InFile) and XPdfForm.FromFile(OverlayFile). Finally you declare an XGraphics.FromPdfPage(page) and use XGraphics.DrawImage to "paint" the XPdfForms, i.e. the contents of the desired pages from both InFile and OverlayFile onto the new page.

You may have to experiment with the order in which you add content from both files, if objects overlap and thus become partly invisible for the wrong order.

Peter


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 208 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group