Print Page | Close Window

SetOutlineDestination(...) Top ?

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=2711
Printed Date: 22 Nov 24 at 1:41PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: SetOutlineDestination(...) Top ?
Posted By: hubbra
Subject: SetOutlineDestination(...) Top ?
Date Posted: 20 Aug 13 at 1:00PM
I try to change the outline show position from all outlines in one PDF to the top of the page.
With DPLSetOutlineDestination(int InstanceID, int OutlineID, int DestPage, double DestPosition);
it should work, but often I see the next page even with DestPosition = 0 or 1 ...
So it looks like the top is not so small and testet 1000 ... looks better, but not perfekt.

I can't find infos in the docu about the real value of "Top of the Page" ... my page is A4 210x297mm.

Any hints ?



Replies:
Posted By: Ingo
Date Posted: 20 Aug 13 at 1:27PM
Hi Hubbra ;-)
 
The question is where the page creation shall begin.
If the starting point is at the bottom, left then "top of page" means (for example) 852 psunits.
If the starting point is top, left then "top of page means 0 or 1 psunits.
If you want to be sure that the starting point is at the top, left then you should use SetOrigin(1) and tell the document that you want to start at the top, left and then the system put your drawings at the top of the page if you're using DrawText(1,1,...).
 
Cheers, Ingo
 


Posted By: hubbra
Date Posted: 20 Aug 13 at 1:37PM
a good question, I thought it would be by PDF / printers always TOP LEFT, but it looks like this is not true on these PDF. When I build my own with QuickPDF i use my class for Xbase++ and this will create top left, but now I have a Framemaker document, with the Acrobat PDF printerdriver.
And it looks like the left bottom is used.

My problem is, how high is the page ?

What is this "psunits" in size ?




Posted By: Ingo
Date Posted: 20 Aug 13 at 6:11PM
You can say (correct) psunits or the common pixels.
PageHeight and PageWidth are functions from QuickPDF.
The resulting value will change (mm, inches or pixels) it depends on SetMeasurementUnits.
To be sure about top, left:
Load the document and use first SetOrigin(1) then it's like you want it. 
Please have a look inside the online reference and the developer guide.
DIN A4 means 842 x 595 pixels means 210 x 297 mm means ... inches.

Cheers, Ingo


Posted By: Wheeley
Date Posted: 20 Aug 13 at 10:32PM
Here's what I used when adding outlines to a workbook. All outlines point to the top of the page.

pdf_idx = 0
page_total = 0
do while (pdf_idx < pdf_count)
            pdf_idx ++
            QuickPDFSelectPage (pdf_instance_id, page_total + 1)
            QuickPDFNewOutline (pdf_instance_id, 0, bookmark, (page_total + 1), QuickPDFPageHeight (pdf_instance_id))
loop

Hope this helps
Wheeley




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