PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Thu Jul 19, 2018 9:27 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Thu Apr 23, 2015 2:47 am 
Offline

Joined: Thu Apr 23, 2015 2:08 am
Posts: 5
I have an VB.Net application that uses PDFsharp to compile PDF files together that are in layered folders and creates bookmarks and title pages for various sections and/or files. Bookmarks have always worked properly for me using the "outlines.add" method.

At the request of a user, I have been trying to add the functionality of automatically inserting PDF files found in the main (root) folder and adding bookmarks for each file found there. The files are inserted and the bookmarks are created, but the some of the bookmarks are exhibiting strange behavior. If I enable page scrolling, they sometimes move the view to the right page, but more often they move to the wrong page much further down the document. If I disable page scrolling view, they work properly every time. It's only these main folder file bookmarks that do this, any other ones I am creating in the application work fine.

My code for adding the bookmarks looks like this:
Code:
      AddPage = MainFilePDF.Pages(0)
      MainFilePage = document.AddPage(AddPage)
      outline = document.Outlines.Add(strParseName, MainFilePage, False, PdfOutlineStyle.Regular, XColors.Black)
      For j As Integer = 1 To MainFilePDF.Pages.Count - 1
         AddPage = MainFilePDF.Pages(j)
         MainFilePage = document.AddPage(AddPage)
      Next

and as I stated, the files do get inserted in the right place and the bookmarks get added.

As it's only some of the main folder files that are involved, I've been trying to figure out if it's something about the PDF version of the files that I'm inserting that's causing this, but thus far I can't see anything consistent in the file formats that are causing the issue.

Has anyone else ever seen this behavior? Unfortunately I can't post a sample file as they contain confidential material.


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

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 5 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