Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - DAGetPageHeight returns always 0.0
  FAQ FAQ  Forum Search   Register Register  Login Login

DAGetPageHeight returns always 0.0

 Post Reply Post Reply
Author
Message
Didi View Drop Down
Beginner
Beginner


Joined: 23 Mar 10
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote Didi Quote  Post ReplyReply Direct Link To This Post Topic: DAGetPageHeight returns always 0.0
    Posted: 24 Mar 10 at 12:25PM
I want to render a preview of an existing PDF into a given rectangle of my dc.
Is that anyhow possible? The render function takes only the DPI, but not the size in pixel, and it begins always at upper left corner of the DC.
Or have I first to render to a bitmap and then to bitblt the bitmap?
How can I detect the aspect ratio of my PDF (or page)? The commands DAGetPageHeight / DAGetPageWidth always return 0.0 when I call them.
Can I render a part of a page? (zoom)
Thank you very much for any answer!
 
 
Back to Top
Didi View Drop Down
Beginner
Beginner


Joined: 23 Mar 10
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote Didi Quote  Post ReplyReply Direct Link To This Post Posted: 24 Mar 10 at 4:04PM
EDIT
the functions PageHeight() and PageWidth() work, in my examples the unis was "point".
Can I detect which unit is given?
Back to Top
Paddy View Drop Down
Beginner
Beginner


Joined: 24 Mar 10
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote Paddy Quote  Post ReplyReply Direct Link To This Post Posted: 24 Mar 10 at 7:49PM
Hi, the SetMeasurementUnits function lets you control which measurement unit is used when measurements are given to and returned from the library.

Edited by Rowan - 24 Mar 10 at 7:51PM
Back to Top
Dario View Drop Down
Beginner
Beginner


Joined: 26 Jul 09
Location: Italy
Status: Offline
Points: 19
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dario Quote  Post ReplyReply Direct Link To This Post Posted: 24 Mar 10 at 9:38PM
You cannot use Da Functions and Normal function together.
The SetMeasurementUnits work with Normal function not DaFunctions
If you want to know the "mm" for example, you have to multiply the value for 25.4/72

Dim HandlerFILE As Long = QUICKPDF_Doc.DAOpenFileReadOnly(FileSelezionato, "")
Dim Pagina As Long = QUICKPDF_Doc.DAFindPage(HandlerFILE, 1)
Dim Misura_l As String = CInt(QUICKPDF_Doc.DAGetPageWidth(HandlerFILE, Pagina) * 25.4 / 72).ToString
Dim Misura_h As String = CInt(QUICKPDF_Doc.DAGetPageHeight(HandlerFILE, Pagina) * 25.4 / 72).ToString
Me.ListaFiles.Items(Indice).SubItems(6).Text = (Misura_l & " x " & Misura_h)
QUICKPDF_Doc.DACloseFile(HandlerFILE)


OK? bye
Back to Top
Didi View Drop Down
Beginner
Beginner


Joined: 23 Mar 10
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote Didi Quote  Post ReplyReply Direct Link To This Post Posted: 25 Mar 10 at 8:17AM
Thank you!
I thought, it could depend on  different files, wich unit is returned, but by default, it's always "point"?
What's the difference between "DA" and "Normal"?
I think QuickPDF is a excellent tool, but newbies like me could save lots of time, if there was more example progams available.
Back to Top
Dario View Drop Down
Beginner
Beginner


Joined: 26 Jul 09
Location: Italy
Status: Offline
Points: 19
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dario Quote  Post ReplyReply Direct Link To This Post Posted: 26 Mar 10 at 1:45PM
When you using DA-Functions.... YES
If you using Normal function like LoadFromFile (for example) you can before set the unit with the function SetMeasurementUnits (1=mm, 2= inches)
DaFunction are the function with hight performance (Direct Access functionality), for me Normal function are all function without prefix "DA" before the function's name.
The problem is that there are many function normal and few DA-Function.
There is a "DEMO App" program with some samples. Download it and install. This is the address.
http://www.quickpdflibrary.com/blog/2009/10/a-customizable-demo-for-quick-pdf-library/

P.S.
You buy the "mantenance" licence, because the QuickPDF Team are really good when you ask assistance.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store