docbook to pdf customization

Having trouble installing <oXygen/>? Got a bug to report? Post it all here.
IsleofGough
Posts: 17
Joined: Fri Dec 02, 2016 9:55 pm

docbook to pdf customization

Post by IsleofGough » Thu Apr 01, 2021 8:08 pm

I know this is a beginner question, but I am not sure what file I should modify to alter the transformation of docbook to pdf. I would like to change the font outputted by the pdf and also fix the numbering issue where there is no space between the number and the text (see attachment). Where would I go to customize the docbook to pdf transform?
OxygenPdfNumbering.jpg
OxygenPdfNumbering.jpg (34.79 KiB) Viewed 577 times
I have tried copying the Docbook-pdf transform and editing the transform to change the parameter from Times New Roman to two different open type fonts. One transforms as the bold version, even though I have regular, italic, and bold installed. The other transforms as italic, even though I have the regular, italic, and bold installed. The numbering option is unclear to me.

IsleofGough
Posts: 17
Joined: Fri Dec 02, 2016 9:55 pm

Re: docbook to pdf customization

Post by IsleofGough » Thu Apr 01, 2021 9:49 pm

For the numbering issue, I don't know how to modify.
For the font, here is what I tried and how it transformed:
OxygenOutputModification.jpg
OxygenOutputModification.jpg (206.13 KiB) Viewed 565 times

Radu
Posts: 7579
Joined: Fri Jul 09, 2004 5:18 pm

Re: docbook to pdf customization

Post by Radu » Mon Apr 05, 2021 9:54 am

Hi,

The rendering of the XSL-FO file to PDF when converting DocBook to PDF using Oxygen is done by default using the free Apache FOP processor. The processor has a configuration file located in "OXYGEN_INSTALL_DIR/lib/fop.xconf" which has an "<auto-detect/>" setting meaning that FOP should be able to auto detect and use fonts from your operating system.
I'm not sure why Apache FOP prefers to use the bold font for that specific font, unfortunately the font seems to be commercial so I cannot test it on my side.
There are other PDF processors, for example the commercial Antenna House processor which can be set up in Oxygen and used in the transformation scenario to produce the PDF:
https://www.oxygenxml.com/doc/versions/ ... r-tab.html

About the numbering problem maybe we should start a separate conversation, maybe you can also post a small DocBook file to reproduce the problem.
There is also a DocBook Apps users list on which you can consider registering:
https://docbook.org/help

Most people registered on the list have experience with DocBook based publishing so they may have better solutions for you. I'm also registered on that list so if I know the answer to a question I can try to help as well.

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

IsleofGough
Posts: 17
Joined: Fri Dec 02, 2016 9:55 pm

Re: docbook to pdf customization

Post by IsleofGough » Mon Apr 05, 2021 6:04 pm

Thank you for your thoughts, Radu. You may be right about the Apache processor.

All the fonts I tested were commercial non pirated fonts. The problematic fonts were invariably from European type foundries, like TEFF, Dutch Type, Hoftype, and Storm. It does not appear to be an issue with extended symbol typefaces, as Adobe Minion Pro works fine.

Interestingly, the "problematic fonts" work fine in InDesign, Framemaker, and even Flare. I use one of them in the XeLaTeX generated pdf that I use for one of my published books and another on a Flare generated book that I did for another person.

I will create another thread for the spacing issue with numbered lists.

Radu
Posts: 7579
Joined: Fri Jul 09, 2004 5:18 pm

Re: docbook to pdf customization

Post by Radu » Mon Apr 05, 2021 6:14 pm

Hi,

As Apache FOP is an open source product, it gets tested mostly with free fonts so it's possible that it has difficulties with newer fonts. At the same time maybe the fonts themselves might have some small problems which confuse FOP.

If you have the time some day maybe as a test you can download the Antenna House FO Processor, get a trial license and set it up in Oxygen in our Preferences->"FO Processors" page: https://www.oxygenxml.com/doc/versions/ ... ssors.html
Then edit the transformation scenario and in the "FO Processor" tab switch to using Antenna House.
In the transformation scenario edit dialog, in the "XSLT" tab if you click the Parameters button, the list of parameters should have a parameter named "fop1.extensions" which you should unset. Instead you should find the parameter "axf.extensions" and set it to "1", then try to produce the PDF.

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

IsleofGough
Posts: 17
Joined: Fri Dec 02, 2016 9:55 pm

Re: docbook to pdf customization

Post by IsleofGough » Mon Apr 05, 2021 8:22 pm

I downloaded the Antenna House FO processor and see that actually purchasing or renting would be VERY expensive. But I cannot get it to work, most likely because your instructions state that "The built-in Antenna House Formatter GUI transformation scenario requires that you configure an external FO processor that runs AHFormatter.exe (Windows only)" and I am using a MAC (with Big Sur).

The numbering could be fixed by increasing the em space in lists, so that part is good.

Radu
Posts: 7579
Joined: Fri Jul 09, 2004 5:18 pm

Re: docbook to pdf customization

Post by Radu » Thu Apr 08, 2021 10:34 am

Hi,

I'm also on Big Sur and I've used Antenna House in the past on it to produce PDFs. Somehow right now I cannot get a trial license from their side to double check this but it works something like this:

1) Go to the Preferences->"XML / PDF Output / FO Processors" page and there is an "Add Antenna House FO processor..." "Browse" button. Use it to navigate to the Antenna House folder and select the "run.sh" executable from there.
2) Edit the DocBook to PDF transformation scenario that you are using and in the "FO Processors" tab choose to use the Antenna House installation instead of the "FOP" builtin processor. Then also change those parameters that I mentioned in one of my previous replies.

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

Post Reply