Sample of PDF embedding
|
PDF Embedding
Possible to embed PDF document in the other PDF.
It is performed by using fo:external-graphic.
<fo:external-graphic src="embedded.pdf#page=3"/>
As described above, specify the page number which you want to embed to the URI. When there is no page number specified, the first page will be embedded. When there is no size specified, it's embedded in the page size of the PDF where it's embedded. However if you want to scale the size, content-width or content-height can be specified as follows:
<fo:external-graphic src="embedded.pdf#page=3" content-width="50%"/>
When specifying PDF by utilizing the data scheme (RFC2397), the page number can be specified as the parameter of the media type as follows.
<fo:external-graphic src="data:application/pdf;page=3;base64,JVBERi0xLjQKJeLjz9M..."/>
A dummy image will be displayed in GUI.
The next block is as follows.
<fo:external-graphic src="embedded.pdf#page=2" content-width="50%"/>
Embed PDF