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!
![]() |
DAGetPageHeight returns always 0.0 |
Post Reply
|
| Author | |
Didi
Beginner
Joined: 23 Mar 10 Status: Offline Points: 9 |
Post Options
Thanks(0)
Quote Reply
Topic: DAGetPageHeight returns always 0.0Posted: 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!
|
|
![]() |
|
Didi
Beginner
Joined: 23 Mar 10 Status: Offline Points: 9 |
Post Options
Thanks(0)
Quote Reply
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?
|
|
![]() |
|
Paddy
Beginner
Joined: 24 Mar 10 Status: Offline Points: 8 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
Dario
Beginner
Joined: 26 Jul 09 Location: Italy Status: Offline Points: 19 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
Didi
Beginner
Joined: 23 Mar 10 Status: Offline Points: 9 |
Post Options
Thanks(0)
Quote Reply
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.
|
|
![]() |
|
Dario
Beginner
Joined: 26 Jul 09 Location: Italy Status: Offline Points: 19 |
Post Options
Thanks(0)
Quote Reply
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. |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store