No, the result is the same with or without post-processing. We are
using XEP 4.3.
On 15 Jun 2005, at 16:13, Alexander Peshkov wrote:
> Does it work if you exclude your post-processing code (set
> pageAreaHandler to null)? Post-processing could be the source of the
> problem, because PI consumed by backends and your XEPContentHandler
> may fail to translate PI to the actual backend.
> Which version of XEP you are using?
>
> GL> No, I am passing the DOMSource directly to render. Here is the
> relevant
> GL> code:
>
> GL> DOMSource source = new DOMSource(doc.getDocumentElement(),
> sysId);
> GL> FOTarget target = new FOTarget(stream, format);
> GL> XEPLogger logger = new XEPLogger();
> GL> if (pageAreaHandler == null) {
> GL> xep.render(source, target, logger);
> GL> } else {
> GL> ContentHandler generator = xep.createGenerator(target,
> logger);
> GL> XEPContentHandler myGenerator =
> GL> new XEPContentHandler(generator, pageAreaHandler);
> GL> xep.render(source, myGenerator, logger);
> GL> }
>
> GL> and here is a sample input document:
>
> GL> <?xml version="1.0"?>
> GL> <?xep-pdf-initial-zoom fit?>
> GL> <?xep-pdf-crop-offset 72pt 72pt 72pt 72pt?>
> GL> <?xep-pdf-bleed 24pt 24pt 24pt 24pt?>
> GL> <?xep-pdf-crop-mark-width 1pt?>
> GL> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
> GL> xmlns:rx="http://www.renderx.com/XSL/Extensions"
> GL> id="root">
> GL> <rx:meta-info id="meta-info">
> GL> <rx:meta-field id="meta1" name="title" value="This is a
> test"/>
> GL> <rx:meta-field id="meta2" name="author" value="John Doe"/>
> GL> </rx:meta-info>
> GL> <fo:layout-master-set id="layout">
> GL> <fo:simple-page-master id="simple" master-name="only"
> GL> page-width="595pt" page-height="842pt">
> GL> <fo:region-body id="body"
> GL> background-color="rgb-icc(255, 255, 255,
> #SpotColor,'PANTONE
> GL> 229 C',1)"
> GL> column-count="2" column-gap="0.5in"
> margin="1in"/>
> GL> </fo:simple-page-master>
> GL> </fo:layout-master-set>
> GL> <fo:page-sequence id="pages" master-reference="only">
> GL> <fo:flow id="flow" flow-name="xsl-region-body">
> GL> <fo:block-container id="block1" position="absolute"
> GL> left="-34pt" top="34pt" width="527pt"
> height="100pt"
> GL> background-color="rgb-icc(255, 255, 255,
> #SpotColor,'PANTONE 540
> GL> C',1)"
> GL> display-align="before">
> GL> <fo:block-container id="block2" position="absolute"
> top="30pt">
> GL> <fo:block id="block3"
> GL> font-family="Helvetica" color="#FFFFFF"
> text-align="left"
> GL> font-size="30pt" line-height="30pt">
> GL> Why don't you take this nice car for a drive and then
> buy
> GL> it. Please. The quick brown fox jumps over the lazy
> dog.
> GL> </fo:block>
> GL> </fo:block-container>
> GL> </fo:block-container>
> GL> <fo:block-container id="block4" position="absolute"
> GL> left="34pt" top="100pt" width="527pt"
> height="774pt"
> GL> display-align="before">
> GL> <fo:block-container id="block5" position="absolute"
> top="30pt">
> GL> <fo:block id="block6" font-family="Helvetica"
> color="#FFFFFF"
> GL> text-align="justify" font-size="24pt"
> line-height="72pt"
> GL> hyphenate="true">
> GL> Lorem ipsum ades dolor sit consec atetuer adipiscing
> elit, sed
> GL> diam nonummy nibh euismod tincidunt ut laoreet dolore
> magna
> GL> aliquam erat volutpat. Ut wisi enim ad minim veniam,
> quis nostrud
> GL> exerci tation ullamcorper suscipit lobortis nisl ut
> aliquip ex ea
> GL> commodo consequat. Duis autem vel eum iriure dolor in
> hendrerit in
> GL> vulputate velit esse molestie consequat, vel illum
> dolore eu
> GL> feugiat nulla facilisis at vero eros et accumsan et
> iusto odio
> GL> dignissim qui blandit praesent luptatum enim ad minim
> veniam, quis
> GL> nostrud exerci tation ullamcorper suscipit lobortis
> nisl utzzril
> GL> delenit.
> GL> </fo:block>
> GL> </fo:block-container>
> GL> </fo:block-container>
> GL> <fo:block-container id="block7" position="absolute"
> GL> left="34pt" top="34pt" width="527pt"
> height="774pt"
> GL> display-align="after"/>
> GL> </fo:flow>
> GL> </fo:page-sequence>
> GL> </fo:root>
>
> GL> Thanks,
> GL> Geoff
>
> GL> On 15 Jun 2005, at 13:02, Alexander Peshkov wrote:
>
>>> Hello Geoff,
>>>
>>> Processing instructions works fine in XEP then DOMSource is passed to
>>> the render method - I've just rechecked it. So it looks like a
>>> problem
>>> with your code. Note that if you feed your DOM object to XSLT
>>> transformer (not to the 'render' method of Formatter, but to
>>> 'transform'
>>> method of FOTransformer) when PIs will be consumed by XSLT engine,
>>> not
>>> XEP.
>>> Still if you post here a relevant code snippet of your Java source
>>> and
>>> input document itself someone may came up with a good suggestion.
>>>
>>> Best regards,
>>> Alexander Peshkov
>>> mailto:peshkov@renderx.com
>>> RenderX
>>>
>>>
>>> GL> We have a document in which we use XEP processing instructions to
>>> GL> specify bleed values and crop marks. When we feed it to XEP on
>>> the
>>> GL> command line (OS X), everything works fine. But when our Java
>>> GL> application feeds it to XEP programatically as a DOMSource, the
>>> GL> processing instructions are ignored.
>>>
>>> GL> Just before rendering the document, I traverse the DOM to verify
>>> that
>>> GL> the processing instructions are there, so I am certain they are.
>>>
>>> GL> Is it possible that XEP ignores processing instructions when
>>> render()
>>> GL> is passed a DOMSource? If not, is there something we might be
>>> doing
>>> GL> wrong?
-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo@renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/terms-of-service.html
Received on Wed Jun 15 08:10:56 2005
This archive was generated by hypermail 2.1.8 : Wed Jun 15 2005 - 08:10:56 PDT