PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Thu Dec 14, 2017 5:56 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Thu Aug 17, 2017 3:06 pm 
Offline

Joined: Sun Aug 13, 2017 4:16 am
Posts: 6
Hi,

Can anyone guide me how to parse a PdfSharp.PdfDocument to MigraDoc.Document or vice versa?

I need to do this because in migradoc i can set the bookmarks and in the pdfsharp i can set the security...

Also i read that:

Quote:
// Heading1 to Heading9 are predefined styles with an outline level. An outline level
// other than OutlineLevel.BodyText automatically creates the outline (or bookmarks)
// in PDF.


There is a way to change the Headings for H1 or specify wich one are bookmars? (Heading1 is equivalent yo H1?)

Thanks


Top
 Profile  
Reply with quote  
PostPosted: Thu Aug 17, 2017 3:20 pm 
Offline
empira Employee
User avatar

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

Create a PDF file with MigraDoc, then use PDFsharp to modify the PDF document.

See this sample:
http://www.pdfsharp.net/wiki/MigraDocHe ... ample.ashx

In line #36 of the first code block is the PDFsharp document - you can modify it before saving it.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Fri Aug 18, 2017 2:23 pm 
Offline

Joined: Sun Aug 13, 2017 4:16 am
Posts: 6
Hi!

Thanks for the answer, i didn't notice that pdfRenderer.PdfDocument returns me a pdfDocument!

Now i have another problem, i have to add bookmarks to my pdf, i know that i can do that with migradocs, if the pdf was created with html code.
The problem is that i already have the pdf file, i cannot create it, there is anyway to interpretate the pdf code to create the bookmarks?

Maybe load the pdf in a object to parse the pdfcode to html again and set the H1-H9 to be bookmarks?

Regards


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 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:  
Powered by phpBB® Forum Software © phpBB Group