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 Venkat Reddy <va...@googlemail.com> on 2009/10/01 14:43:33 UTC
Page Overlay (IPO) Extension example
Hi,
Can some one provide me a basic Page Overlay (IPO) Extension example FO
file?
I have gone through the AFP extensions
http://xmlgraphics.apache.org/fop/trunk/output.html#afp-page-overlay
<fo:layout-master-set>
<fo:simple-page-master master-name="simple">
<afp:include-page-overlay name="O1SAMP1 " /> ...
</fo:simple-page-master>
</fo:layout-master-set>
This defines a page overlay, but how to invoke this overlay in
<fo:page-sequence><fo:flow>?
Thanks,
Venkat.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Page Overlay (IPO) Extension
Posted by Venkat Reddy <va...@googlemail.com>.
Hi Jeremias,
Thanks for your help. I have done few changes to the
AFPPageSetupElement.java, and the offset coordinates are working infact.
I just want to know more on your other point mentioned in your reply
'offset coordinates user-friendly'...
There is some code I have found in
*org.apache.fop.afp.AFPUnitConverter*
, namely the method
*public int[] mpts2units(float[] srcPts)*
Is this the same method you are suggesting me to use to map the
user-friendly offset coordinates to get converted into float values?
Thanks,
Venkat.
Jeremias Maerki wrote:
> Venkat,
>
> first of all you probably need to subclass AFPPageSetupElement to add
> support for carrying the offset coordinates. AFPElementMapping would
> then also need to be changed. Then you'd need to move on to
> AFPDocumentHandler.handleExtensionObject where the extension is
> converted into calls into the AFP library.
> DataStream.createIncludePageOverlay would then also need to be extended.
> And so on and on...
>
> I guess one challenge is to make the specification of the offset
> user-friendly. I don't think it's acceptable to expect from the user to
> know what numeric value would need to be specified to get the right
> placing. Maybe you can reuse something from the FO property subsystem to
> parse arbitrary lengths, internally work with millipoints and then
> convert that to the final value.
>
> On 01.10.2009 16:52:23 Venkat Reddy wrote:
>
>> Hi,
>>
>> I want to include X and Y coordinates to the <afp:include-page-overlay>
>> definition, something like below....
>>
>> <afp:include-page-overlay id="IPO001" name="O1tcgas1" *x="300"
>> y="500"*/>
>>
>> in PageObject.java, the following method will be used when there is an
>> overlay referenced in a FO document.
>> public void *createIncludePageOverlay*(String name, *int x, int y*,
>> int orientation)
>>
>> where the X and Y coordinates hardcoded as '0' in *DataStream.java*. I
>> want to pass these values through the above page overlay definition, Can
>> someone tell me, how do I pass these coordinates?
>>
>> Thanks,
>> Venkat.
>>
>
>
>
>
> Jeremias Maerki
>
>
>
Re: Page Overlay (IPO) Extension
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Venkat,
first of all you probably need to subclass AFPPageSetupElement to add
support for carrying the offset coordinates. AFPElementMapping would
then also need to be changed. Then you'd need to move on to
AFPDocumentHandler.handleExtensionObject where the extension is
converted into calls into the AFP library.
DataStream.createIncludePageOverlay would then also need to be extended.
And so on and on...
I guess one challenge is to make the specification of the offset
user-friendly. I don't think it's acceptable to expect from the user to
know what numeric value would need to be specified to get the right
placing. Maybe you can reuse something from the FO property subsystem to
parse arbitrary lengths, internally work with millipoints and then
convert that to the final value.
On 01.10.2009 16:52:23 Venkat Reddy wrote:
> Hi,
>
> I want to include X and Y coordinates to the <afp:include-page-overlay>
> definition, something like below....
>
> <afp:include-page-overlay id="IPO001" name="O1tcgas1" *x="300"
> y="500"*/>
>
> in PageObject.java, the following method will be used when there is an
> overlay referenced in a FO document.
> public void *createIncludePageOverlay*(String name, *int x, int y*,
> int orientation)
>
> where the X and Y coordinates hardcoded as '0' in *DataStream.java*. I
> want to pass these values through the above page overlay definition, Can
> someone tell me, how do I pass these coordinates?
>
> Thanks,
> Venkat.
Jeremias Maerki
Page Overlay (IPO) Extension
Posted by Venkat Reddy <va...@googlemail.com>.
Hi,
I want to include X and Y coordinates to the <afp:include-page-overlay>
definition, something like below....
<afp:include-page-overlay id="IPO001" name="O1tcgas1" *x="300"
y="500"*/>
in PageObject.java, the following method will be used when there is an
overlay referenced in a FO document.
public void *createIncludePageOverlay*(String name, *int x, int y*,
int orientation)
where the X and Y coordinates hardcoded as '0' in *DataStream.java*. I
want to pass these values through the above page overlay definition, Can
someone tell me, how do I pass these coordinates?
Thanks,
Venkat.
[ANN] VTD-XML 2.7
Posted by jimmy Zhang <cr...@comcast.net>.
VTD-XML 2.7 is released and can be downloaded at
http://sourceforge.net/projects/vtd-xml/files/
Below is a summary of what are the new features and enhancements.
Expanded VTD-XML's Core API
* VTDNav: toStringUpperCase, toStringLowerCase, contains(), endsWith(),
startsWith()
* Extended VTD added in-memory buffer support
Improved Xpath
* added the following XPath 2.0 functions: abs(), ends-with(), upper-case(),
lower-case()
* added support for variable reference
* significantly enhanced XPath syntax, checking error reporting (Special
thanks to Mark Swanson)
* Internal performance tuning
Bug fixes and Code Enhancement
* C version significantly removed warning message, fix memory leak during
Xpath expression parsing,
* Various bug fies (Special thanks to Jon Roberts, John Zhu, Matej Spiller,
Steve Polson, and Romain La Tellier)
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Page Overlay (IPO) Extension example
Posted by Venkat Reddy <va...@googlemail.com>.
Hi Adrian,
Thanks for your reply. I have got the sample working. I want to add the
offset coordinates to the include-page-overlay definition, as Jeremias
stated in other mail pointing to the same java file you mentioned. I am
doing the code changes required in my local copy in order to position
the page overlay at an offset given through the coordinates. Thanks once
again for your input...
Venkat.
Adrian Cumiskey wrote:
> Hi Venkat,
>
> Currently <afp:include-page-overlay /> is only supported as a child of
> <fo:simple-page-master master-name="simple"> as given in the example.
> You'll need to adjust
> org.apache.fop.render.afp.extensions.AFPPageSetupElement.startOfNode()
> to make this extension allowable in <fo:page-sequence><fo:flow>. Then
> test it out, see if the IPO finds its way into the AFP output, if not
> you'll have to trace through the execution. Have fun :).
>
> Adrian.
>
> Venkat Reddy wrote:
>> Hi,
>>
>> Can some one provide me a basic Page Overlay (IPO) Extension example
>> FO file?
>> I have gone through the AFP extensions
>>
>> http://xmlgraphics.apache.org/fop/trunk/output.html#afp-page-overlay
>>
>> <fo:layout-master-set>
>> <fo:simple-page-master master-name="simple">
>> <afp:include-page-overlay name="O1SAMP1 " /> ...
>> </fo:simple-page-master>
>> </fo:layout-master-set>
>>
>> This defines a page overlay, but how to invoke this overlay in
>> <fo:page-sequence><fo:flow>?
>>
>> Thanks,
>> Venkat.
>>
>> ---------------------------------------------------------------------
>> 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
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Page Overlay (IPO) Extension example
Posted by Adrian Cumiskey <de...@cumiskey.com>.
Hi Venkat,
Currently <afp:include-page-overlay /> is only supported as a child of
<fo:simple-page-master master-name="simple"> as given in the example.
You'll need to adjust
org.apache.fop.render.afp.extensions.AFPPageSetupElement.startOfNode()
to make this extension allowable in <fo:page-sequence><fo:flow>. Then
test it out, see if the IPO finds its way into the AFP output, if not
you'll have to trace through the execution. Have fun :).
Adrian.
Venkat Reddy wrote:
> Hi,
>
> Can some one provide me a basic Page Overlay (IPO) Extension example
> FO file?
> I have gone through the AFP extensions
>
> http://xmlgraphics.apache.org/fop/trunk/output.html#afp-page-overlay
>
> <fo:layout-master-set>
> <fo:simple-page-master master-name="simple">
> <afp:include-page-overlay name="O1SAMP1 " /> ...
> </fo:simple-page-master>
> </fo:layout-master-set>
>
> This defines a page overlay, but how to invoke this overlay in
> <fo:page-sequence><fo:flow>?
>
> Thanks,
> Venkat.
>
> ---------------------------------------------------------------------
> 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