|
PDFsharp - moved to http://forum.pdfsharp.net/ Please visit the new PDFsharp forum at http://forum.pdfsharp.net/
|
Important Notice:
We regret to inform you that our free phpBB forum hosting service will be discontinued by the end of June 30, 2024.
If you wish to migrate to our paid hosting service, please contact billing@hostonnet.com.
View previous topic :: View next topic |
Author |
Message |
cvanling
Joined: 11 Jan 2008 Posts: 5
|
Posted: Fri Jan 11, 2008 7:17 pm Post subject: What version to use when merging documents? |
|
|
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 |
|
|
Thomas Hoevel
Joined: 16 Oct 2006 Posts: 387 Location: Cologne, Germany
|
Posted: Mon Feb 18, 2008 8:07 am Post subject: |
|
|
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 |
|
|
|
|
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
|
|