How to embed PDF files in Docbook when output format is also PDF

Having trouble installing <oXygen/>? Got a bug to report? Post it all here.
Ahnde
Posts: 1

How to embed PDF files in Docbook when output format is also PDF

Mon Mar 27, 2017 8:05 pm

Hey,

I am trying to generate a PDF version of my Docbook. This document includes lots of text, but also several figures.
In order to make those figures look sharp in the PDF output file, the figures are also included as PDF format.

This works perfectly fine, when I am generating HTML output, but when the output format is PDF the figures are just not shown. Why?

I am including the figures as shown below:
<inlinemediaobject>
<imageobject>
<imagedata fileref="./figure.pdf"/>
</imageobject>
</inlinemediaobject>

And when I add the attribute format="PDF" to the imagedata, OxygenXML is even complaining and states that this is not a valid value for format.
Radu
Posts: 5507

Re: How to embed PDF files in Docbook when output format is also PDF

Tue Mar 28, 2017 1:29 pm

Hi,

Are you using Docbook 4 or 5?
So you are referencing PDF images in the Docbook documents.
There are three aspects here:

1) Rendering the PDF image in the Author visual editing mode when the Docbook XML document is opened in Oxygen.
In order for this to work you would need to follow these steps:

https://www.oxygenxml.com/doc/versions/18.1/ug-editor/tasks/installing-pdf-library.html?hl=pdfbox

You also mention this problem:

And when I add the attribute format="PDF" to the imagedata, OxygenXML is even complaining and states that this is not a valid value for format.


I cannot reproduce this validation error, do you possibly have some custom Schematron rules specific for your project?
If not, maybe you can put together a small sample project exhibiting the problem and send it to support@oxygenxml.com

2) Rendering the PDF image in the published HTML output. From what I tested this does not work by default, you mentioned that it works for you so maybe you have some HTML output customizations for this.

3) Rendering the PDF image in the published PDF output. By default the PDF processor used by Oxygen to produce the PDF (Apache FOP) does not have support for PDF images but you can add support to it.
Please read this topic:

https://www.oxygenxml.com/doc/versions/18.1/ug-editor/topics/built-in-fop-additional-libraries.html

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Return to “Common Problems”

Who is online

Users browsing this forum: No registered users and 0 guests