[xep-support] Using rx:insert-document

From: Darren Munt <darrenm_at_ADDRESS_REMOVED>
Date: Wed Nov 04 2015 - 22:39:13 PST

I've just upgraded to the latest XEP version and I'm trying to insert an existing PDF into a document using the rx:insert-document extension. I wasn't able to find a working example of this, if there is one I'd appreciate a link to it. However I found a support query about it and managed to glean the following XSL from it:

<fo:page-sequence master-reference="mainportrait" rx:insert-document="url(pdfdocname.pdf)">
        <fo:flow flow-name="xsl-region-body">
<fo:block />
        </fo:flow>
</fo:page-sequence>

When I send this to RenderX, the resulting document does not include my static PDF. However when I put some content in the fo:block, the static PDF is included but so is whatever content I place in the block appears on a new page at the end. For example:

<fo:page-sequence master-reference="mainportrait" rx:insert-document="url(pdfdocname.pdf)">
        <fo:flow flow-name="xsl-region-body">
<fo:block>.</block>
        </fo:flow>
</fo:page-sequence>

I'm not at all sure that I have the syntax correct, but this is the only way I have been able to get it to work so far. Could you please let me know where I'm going wrong?

I have simplified my FO down to this to reproduce the behaviour:

<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:rx="http://www.renderx.com/XSL/Extensions">
  <fo:layout-master-set>
    <fo:simple-page-master master-name="mainportrait" page-width="21.0cm" page-height="29.7cm" margin-top="0.5cm" margin-bottom="0.5cm" margin-left="0.5cm" margin-right="0.5cm">
      <fo:region-body margin-top="0" margin-bottom="0" margin-left="0" margin-right="0" />
    </fo:simple-page-master>
  </fo:layout-master-set>
  <fo:page-sequence master-reference="mainportrait" rx:insert-document="url(mypdf.pdf)">
    <fo:flow flow-name="xsl-region-body">
      <fo:block />
    </fo:flow>
  </fo:page-sequence>
</fo:root>

Produces a blank document.

<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:rx="http://www.renderx.com/XSL/Extensions">
  <fo:layout-master-set>
    <fo:simple-page-master master-name="mainportrait" page-width="21.0cm" page-height="29.7cm" margin-top="0.5cm" margin-bottom="0.5cm" margin-left="0.5cm" margin-right="0.5cm">
      <fo:region-body margin-top="0" margin-bottom="0" margin-left="0" margin-right="0" />
    </fo:simple-page-master>
  </fo:layout-master-set>
  <fo:page-sequence master-reference="mainportrait" rx:insert-document="url(mypdf.pdf)">
    <fo:flow flow-name="xsl-region-body">
     <fo:block>.</fo:block>
    </fo:flow>
  </fo:page-sequence>
</fo:root>

Produces a document with the inserted PDF and another page at the end with a full stop.

Thanks!

_______________________________________________
(*) To unsubscribe, please visit http://lists.renderx.com/mailman/options/xep-support
(*) By using the Service, you expressly agree to these Terms of Service http://w
ww.renderx.com/terms-of-service.html
Received on Wed Nov 4 22:32:08 2015

This archive was generated by hypermail 2.1.8 : Wed Nov 04 2015 - 22:32:21 PST