Print Page | Close Window

Creating new outlines- wrong pages bug

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=1032
Printed Date: 02 Mar 26 at 7:36PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Creating new outlines- wrong pages bug
Posted By: rogerad
Subject: Creating new outlines- wrong pages bug
Date Posted: 16 Mar 09 at 7:11AM
i am creating new outline bookmarks
here is my code

qpbook.selectedpage(prpage);
curoutlineid  := qpbook.newoutline(0,prtitle,prpage,0);

in delphi

the NEW bookmark points to the correct page when i view the pdf in adobe

 But after clicking the bookmark ,      the bookmark POINTS to the NEXT page in the pdf


eg correct page is page 5 but bookmark points to page 6 in pdf


-------------
roger adams



Replies:
Posted By: Ingo
Date Posted: 16 Mar 09 at 7:42AM
Hi Roger!

When you're creating a new document. QuickPDF assumes that there should be at least one page - so QP does this automatically and so page 1 is already there. When you're adding now page by page to the new document i can imagine that you forgot the first page from QP? ... And so the index is shifted by one. Am i right?

Cheers, Ingo



Posted By: rogerad
Date Posted: 16 Mar 09 at 5:13PM
Ingo

 the pdf is already in existence

 i am just adding extra bookmarks to the pdf

the pdf has 20 bookmarks in it before i add extra bookmarks

the extra bookmarks point to the correct pages when viewed in adobe

 BUT when i click on them they point to the page ABOVE the correct page

 eg page 5 bookmarks points to page 6 after being clicked in adove


-------------
roger adams


Posted By: Ingo
Date Posted: 16 Mar 09 at 5:20PM
Is it possible to upload it...?
Can we see it anywhere?

Cheers, Ingo


Posted By: rogerad
Date Posted: 18 Mar 09 at 6:14AM
ingo


 i have worked out that the problem is caused by the vertical position
 if i set a position of 450 or greater, then the correct page appears


i am using setorigin top left


WHY DOES THIS HAPPEN ???


ROGER


-------------
roger adams


Posted By: Rowan
Date Posted: 25 Mar 09 at 1:01AM
Hi Roger,

You have correctly identified the cause of the problem by setting the
vertical position to something other than zero. The default
co-ordinate system measures from the bottom of the page. So if a value
of 0 for the vertical position is used Acrobat / Adobe Reader will
show the next page (the top of the following page is attached to the
bottom of the linked to page).

I hope this helps.

Cheers,
Rowan



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk