PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Wed Jul 03, 2024 1:23 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Mon Jan 12, 2009 3:10 pm 
Offline

Joined: Thu Jan 25, 2007 3:37 pm
Posts: 4
Hello,

is it possible to load an existing PDF file into a MigraDoc document object to modify it there, using the functions of MigaDoc, and to save it with a different filname afterwards?

Background: I want to use this PDF as layout-template, replace some textmarks and save it then.

(i found some answers here in the forum where people say "you can load the PDF into a migra doc document" but the answers did not mention how to load the file!!)

Thanks in advance,
Ralf


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Jan 12, 2009 4:00 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3101
Location: Cologne, Germany
Hi!

You can mix PDF pages into a MigraDoc generated PDF file.

We use PDF pages as stationary (PDF contains logos and corporate design, MigraDoc adds the text).

Using the PDF page as a template is not that easy.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Jan 12, 2009 4:07 pm 
Offline

Joined: Thu Jan 25, 2007 3:37 pm
Posts: 4
Thomas Hoevel wrote:
We use PDF pages as stationary (PDF contains logos and corporate design, MigraDoc adds the text).


Hi Thomas,

that would a first step for me. Hovever i have no idea HOW to do that.

I would need to add an address and some tables with data. The "stationary" (how you call it) would contain a logo and some other static text.

Gould you give me a hint where to start?

Thanks in advance,
Ralf


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Jan 13, 2009 12:20 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3101
Location: Cologne, Germany
Look at this sample:
http://www.pdfsharp.de/PDFsharp/index.p ... &Itemid=63

Look at SamplePage2.
Note: you have to call AddPage and GfxFromPage inside the loop.
Add your stationary from an XImage instead of drawing the rectangle.
You can add any PDFsharp object before or after calling RenderPage.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Mon Jun 22, 2009 9:14 pm 
Offline

Joined: Mon Jun 22, 2009 6:37 pm
Posts: 1
Hi. I'm new to programming so forgive my ignorance. My goal is to read several existing pdf documents and combine them into a single document. I also wish to add footers with the page number on it. The example you suggest creates the pdf on the fly, not from reading an existing document. Is there another example that might be a little clearer?


Top
 Profile  
Reply with quote  
PostPosted: Tue Jun 23, 2009 7:51 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3101
Location: Cologne, Germany
http://www.pdfsharp.de/PDFsharp/index.p ... &Itemid=45
http://www.pdfsharp.de/PDFsharp/index.p ... &Itemid=60
http://www.pdfsharp.de/PDFsharp/index.p ... &Itemid=49

_________________
Regards
Thomas Hoevel
PDFsharp Team


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

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 22 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