Products Downloads


French version



 


This macro represents the <fox:external-document> tag (click here for more details).

It produces <fox:external-document src="..." /> as an output (see https://xmlgraphics.apache.org/fop/fop-pdf-images.html)

This tag is used to insert the content of an external document in PDF format in the produced document. To use it, the XML "xmlns:fox" namespace needs to be defined in the APE template as follows:

<@hardisFo.foRoot xmlns\:fox="http://xmlgraphics.apache.org/fop/extensions">


Caution:

In a template, this tag must be a child of the hardisFo.foRoot tag (so at the same level as hardisFo.foPageSequence tags).

A single page can be inserted into a PDF document. To do this, the tag's SRC attribute must contain a URL defining the external document and ending in "#page=XXX" where XXX represents the page number in this document.



Empty directive: Yes


Parameters

String

src

Alphanumeric character from URI to a document

Mandatory


This macro may also have optional parameters (see associated tag specification).



For example

<#-- Include a PDF document in the same data sub-directory of the directory containing the main template -->
<@hardisFo.foxExternalDocument contentType="pdf" src=hardisCore.templateResToBase64DataURI("data/sample_pdf_doc.pdf", "main", "application/pdf")/>

<#-- Include a PDF document in the directory c:\data -->
<@hardisFo.foxExternalDocument contentType="pdf" src="url(file:///C:/data/sample_pdf_doc.pdf)"/>

<#-- Include the third page of the PDF document defined by this example URL -->
<@hardisFo.foxExternalDocument content-type="pdf" src="https://file-examples.com/wp-content/uploads/2017/10/file-example_PDF_500_kB.pdf#page=3"/>

↑ Top of page


 



  • Aucune étiquette