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 - how to use GetOrigin function ?
  FAQ FAQ  Forum Search   Register Register  Login Login

how to use GetOrigin function ?

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


Joined: 04 Jul 12
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote jdddahl Quote  Post ReplyReply Direct Link To This Post Topic: how to use GetOrigin function ?
    Posted: 04 Jul 12 at 10:11AM
I work on a very basic module which takes PDF files on input and gets all text data in.
Fot that, I use the function DAExtractPageText

Generally, it works fine, but I encountered a document with all items having negative Y coordinates.

In fact, these coordinates start from the top (beeing negative) instead of the expected (positive) values described in the DAExtractPageText function. "...The co-ordinates are the four points bounding the text, measured in points (1/72
inch) with the bottom-left corner of the page as the origin...."


Reading the description given with the SetOrigin function, I expected to get the same information using GetOrigin in order to use it accordingdly.

For all files (even the one which gave me negative coordinates) , I always get the value "0" from GetOrigin (meaning "bottom-left")

Is GetOrigin not helpful in that situation?
Is there another way for knowing the coordinate system for a given PDF document we open?

many thanks for help.
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3530
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 04 Jul 12 at 10:27AM
Hi!

Perhaps this issue has additonally to do with the option "rotated"?
You can check this with function "PageRotation":
http://www.quickpdflibrary.com/help/quickpdf/PageRotation.php

Cheers and welcome here,
Ingo

Back to Top
jdddahl View Drop Down
Beginner
Beginner


Joined: 04 Jul 12
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote jdddahl Quote  Post ReplyReply Direct Link To This Post Posted: 04 Jul 12 at 1:51PM
Thank you Ingo,

I've tried both: property PageRotation and function DAPageRotation
=> Always returning '0' as if document was not rotated.

Isn't it related to the way or version the PDF file was generated with?
Shouldn't GetOrigin return a consistent value anyway?

main functions used are:

var iPDFLibrary = new ActiveXObject("QuickPDFAX0815.PDFLibrary") ;     // OK
var nResult = iPDFLibrary.Unlockkey(szLicenceKey) ;                    // OK
var nFileHandle = iPDFLibrary.DAOpenFile(szPDFFile,'') ;               // OK
var iPageReference = iPDFLibrary.DAFindPage(nFileHandle,nPage) ;         //OK
var nOriginSystem = iPDFLibrary.GetOrigin() ;                         // ?
var nRotation = iPDFLibrary.DAPageRotation(nFileHandle,nPage) ;       // ?
var nPageHeight = iPDFLibrary.DAGetPageHeight(nFileHandle,iPageReference) ; //OK
var nPageWidth = iPDFLibrary.DAGetPageWidth(nFileHandle,iPageReference) ;    //OK

var szPageContentBuffer = iPDFLibrary.DAExtractPageText(nFileHandle,iPageReference,4) ; // OK but some Y coords return <0 values


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