IMPORTANT ANNOUNCEMENT

These forums were permanently set to read-only mode on July 20, 2022. From that day onwards, no new posting or comment is allowed on the site, but the historical content remains intact and searchable.

A new location for posting questions about PlanetPress Suite is now available:

OL Learn - PlanetPress Classic (opens in new tab)

Topic Options
#57523 - 06/19/20 01:17 PM Trying to locate the PDF region location
Uomo Del Ghiaccio Offline
OL Expert

Registered: 02/21/01
Posts: 669
PDF emulation
Need to blank out a line based on the presence of text on the next line.

So if there is a region(1.8542,3.4063,3.6042,4.7396) which includes several lines.

On one of the lines there is a Static Text Value.
I need to find the Region location for this specific line to set them in a global variable.

I will then use the global variable to determine the physical location of other objects.

This is due to some float in the location in the PDF file that they are not able to correct. The shift is +-3 lines so a 6-7 line range.
_________________________
Uomo Del Ghiaccio
--------------------

Top
#57525 - 06/22/20 11:07 AM Re: Trying to locate the PDF region location [Re: Uomo Del Ghiaccio]
Philippe F. Offline
OL Expert

Registered: 09/06/00
Posts: 1984
Loc: Objectif Lune, Montreal, Qc
Assuming all characters in that region use the same font size, then you could do a simple calculation based on the index of the line where the static text is found.

Let's say for instance that you issue a statement similar to
Code:
&myRegion =  region(1.8542,3.4063,3.6042,4.7396)

and that returns 9 lines.

Let's then imagine your static text is found in &myRegion[3] (which is the fourth line in the region). So if your text size is 1/6th of an inch (.167 inch), then your static text is located at :

3.4063 + (4 * .167) ==> 4.0743
_________________________
Technical Product Manager
I don't want to achieve immortality through my work; I want to achieve immortality through not dying - Woody Allen

Top