You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Rob Sargent <rs...@xmission.com> on 2011/05/14 00:26:29 UTC

breakpoint suggestions please

I'm in fop-1.0 source (thank you all very much) trying to find the last 
element written to the pdf.


Situation:
I need to dynamically size static regions such that I can accurately 
apportion the page.  We generate a separate pdf for table(s) then 
calculate depth of that and use that value to size a region-before. (The 
two pdfs are then overlayed to generate a single pdf.)

History:
We have code which works in for fop-0.94 and works to a certain extent 
in fop-0.95 but I would rather converge our shop on fop-1.0.  The 095 
implementation does not find "stuff" below about half the page.

Confession:
Both implementations are, by the admission of the author, wild-ass 
guesses of what the content of the pdf-as-byte-array means.

Aspirations:
Find a definitive answer to the age-old question Where is the text in a 
pdf? Hoping against hope that I can detect something useful during the 
fo->pdf transformation that I can look for later in our application.


Any suggestions welcome.

Thanks.

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: breakpoint suggestions please

Posted by Rob Sargent <rs...@xmission.com>.
Jeremias,

Thanks a ton for the pointer.  Off I go...

rjs


On 05/16/2011 12:18 AM, Jeremias Maerki wrote:
> Rob, I guess it's easiest if you produce the area tree XML (-at,
> application/X-fop-areatree) and then retrieve the span elements' "bpda"
> values (block-progression-dimension allocated). XPath:
> /areaTree/pageSequence/pageViewport/page/regionViewport/regionBody/mainReference/span/flow
>
> The values returned are in millipoints (1000ths of a point), FOP's
> internal measurement unit.
>
> See also: http://xmlgraphics.apache.org/fop/1.0/intermediate.html#usage
>
> On 14.05.2011 00:26:29 Rob Sargent wrote:
>> I'm in fop-1.0 source (thank you all very much) trying to find the last
>> element written to the pdf.
>>
>>
>> Situation:
>> I need to dynamically size static regions such that I can accurately
>> apportion the page.  We generate a separate pdf for table(s) then
>> calculate depth of that and use that value to size a region-before. (The
>> two pdfs are then overlayed to generate a single pdf.)
>>
>> History:
>> We have code which works in for fop-0.94 and works to a certain extent
>> in fop-0.95 but I would rather converge our shop on fop-1.0.  The 095
>> implementation does not find "stuff" below about half the page.
>>
>> Confession:
>> Both implementations are, by the admission of the author, wild-ass
>> guesses of what the content of the pdf-as-byte-array means.
>>
>> Aspirations:
>> Find a definitive answer to the age-old question Where is the text in a
>> pdf? Hoping against hope that I can detect something useful during the
>> fo->pdf transformation that I can look for later in our application.
>>
>>
>> Any suggestions welcome.
>>
>> Thanks.
>
>
> Jeremias Maerki
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: breakpoint suggestions please

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Rob, I guess it's easiest if you produce the area tree XML (-at,
application/X-fop-areatree) and then retrieve the span elements' "bpda"
values (block-progression-dimension allocated). XPath:
/areaTree/pageSequence/pageViewport/page/regionViewport/regionBody/mainReference/span/flow

The values returned are in millipoints (1000ths of a point), FOP's
internal measurement unit.

See also: http://xmlgraphics.apache.org/fop/1.0/intermediate.html#usage

On 14.05.2011 00:26:29 Rob Sargent wrote:
> I'm in fop-1.0 source (thank you all very much) trying to find the last 
> element written to the pdf.
> 
> 
> Situation:
> I need to dynamically size static regions such that I can accurately 
> apportion the page.  We generate a separate pdf for table(s) then 
> calculate depth of that and use that value to size a region-before. (The 
> two pdfs are then overlayed to generate a single pdf.)
> 
> History:
> We have code which works in for fop-0.94 and works to a certain extent 
> in fop-0.95 but I would rather converge our shop on fop-1.0.  The 095 
> implementation does not find "stuff" below about half the page.
> 
> Confession:
> Both implementations are, by the admission of the author, wild-ass 
> guesses of what the content of the pdf-as-byte-array means.
> 
> Aspirations:
> Find a definitive answer to the age-old question Where is the text in a 
> pdf? Hoping against hope that I can detect something useful during the 
> fo->pdf transformation that I can look for later in our application.
> 
> 
> Any suggestions welcome.
> 
> Thanks.



Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org