PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sat Apr 27, 2024 4:52 pm

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: Fri Jan 11, 2008 7:17 pm 
Offline

Joined: Fri Jan 11, 2008 6:15 pm
Posts: 5
Hi,

I've used PdfSharp to create a splitter/merge tool. I am quite happy with the results, it is quite compatible with most files, and vert fast as well. Great work!

A few questions on various things:

1) When creating a merged document from several input documents, what PDF version should be used for the output document? My current logic is that if the input document has a higher version than the output document I increase the version of the output document to match. Is this correct or should the output document remain at version 1.4?

2) I've written some utilities for importing bookmarks which I was thinking of contributing to the community. Is there a place to post user contributed code?

3) I found that the PDFreader will not open files that have multiple documents contained within (example is the PDF 1.7 reference from the adobe web site). Is there a way to make this work?

4) Is there a way to get the current page number from a PdfPage object? I needed this to get the actual page number the bookmark is pointing to.
I came up with this, but it seems like a hard way to do it:

Code:
// convert page from a bookmark to offset
// pref is from the page pointed to from the bookmark
int page_offset = -1;
for (int x = 0; x < inputDocument.Pages.Count; ++x)
{
    PdfReference PageRef = (PdfReference) 
    inputDocument.Pages.PagesArray.Elements[x];
    if (PageRef == pref)
         {
         page_offset = x;
         break;
         }
}


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Feb 18, 2008 8:07 am 
Offline
PDFsharp Guru
User avatar

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

Re 1:
I'd do the same (I dunno what'll happen if post-1.4 features are used in a 1.4 file).

Re 2:
You can send them to empira for review and possible inclusion in the samples folder.
Or you can post the URL of your site here (as soon as you have 5 posts on this forum (a SPAM prevention scheme we cannot turn off)).

_________________
Regards
Thomas Hoevel
PDFsharp Team


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 377 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