PDFsharp & MigraDoc Foundation
https://forum.pdfsharp.net/

Loading a PDF file into a MigraDoc document?
https://forum.pdfsharp.net/viewtopic.php?f=2&t=605
Page 1 of 1

Author:  rkaiser [ Mon Jan 12, 2009 3:10 pm ]
Post subject:  Loading a PDF file into a MigraDoc document?

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

Author:  Thomas Hoevel [ Mon Jan 12, 2009 4:00 pm ]
Post subject: 

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.

Author:  rkaiser [ Mon Jan 12, 2009 4:07 pm ]
Post subject: 

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

Author:  Thomas Hoevel [ Tue Jan 13, 2009 12:20 pm ]
Post subject: 

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.

Author:  ken44 [ Mon Jun 22, 2009 9:14 pm ]
Post subject:  Re: Loading a PDF file into a MigraDoc document?

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?

Author:  Thomas Hoevel [ Tue Jun 23, 2009 7:51 am ]
Post subject:  Re: Loading a PDF file into a MigraDoc document?

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

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/