Print Page | Close Window

GetPageText

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=2430
Printed Date: 13 Jul 25 at 11:44PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: GetPageText
Posted By: jmontoya
Subject: GetPageText
Date Posted: 11 Oct 12 at 3:43PM
Hello,
I need to know text angle in getpagetext. Will it be possible to get this value in a future release?

Thanks,
Jordi




Replies:
Posted By: Ingo
Date Posted: 11 Oct 12 at 7:56PM
Hi Jordi!

If it's the rectangle around the text you want
Then you should try option "3". Please read here:
http://www.quickpdflibrary.com/help/quickpdf/GetPageText.php

Cheers, Ingo



Posted By: AndrewC
Date Posted: 12 Oct 12 at 11:54AM
It should be possible now with option 3.  You can check the relationship of the first point returned to that of the second point.

GetPageText  - Option 3

3 = Return a CSV string for each piece of text on the page with the following
format:
Font Name, Text Color, Text Size, X1, Y1, X2, Y2, X3, Y3, X4, Y4, Text
The co-ordinates are the four points bounding the text, measured using the
units set with the SetMeasurementUnits function and the origin set with
the SetOrigin function. Co-ordinate order is anti-clockwise with the bottom
left corner first.

This is just from the top of my head so you will need to test this and correct it if I am wrong.

if (X2 > X1) the angle = 0;
if (Y2 > Y1) then angle = 90;
if (X2 < X1) then angle = 180;
if (Y2 < Y1) then angle = 270;

This of course won't work if the text is rotate 45 degrees.  It should be possible to determine the angle using trigonometry of the line (x1, Y1) - (X2, Y2).

Andrew.



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