PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index PDFsharp - moved to http://forum.pdfsharp.net/
Please visit the new PDFsharp forum at http://forum.pdfsharp.net/
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

What version to use when merging documents?

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index -> Support - moved to http://forum.pdfsharp.net/
View previous topic :: View next topic  
Author Message
cvanling



Joined: 11 Jan 2008
Posts: 5

PostPosted: Fri Jan 11, 2008 7:17 pm    Post subject: What version to use when merging documents? Reply with quote

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;
         }
}
Back to top
View user's profile Send private message
Thomas Hoevel



Joined: 16 Oct 2006
Posts: 387
Location: Cologne, Germany

PostPosted: Mon Feb 18, 2008 8:07 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index -> Support - moved to http://forum.pdfsharp.net/ All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © phpBB Group. Hosted by phpBB.BizHat.com


Start Your Own YouTube Clone

Free Web Hosting | Free Forum Hosting | FlashWebHost.com | Image Hosting | Photo Gallery | FreeMarriage.com

Powered by PhpBBweb.com, setup your forum now!
For Support, visit Forums.BizHat.com