Custom pdf plugin - static text language issue

Having trouble installing Oxygen? Got a bug to report? Post it all here.
justyna_i
Posts: 33
Joined: Mon Oct 08, 2018 12:16 pm

Custom pdf plugin - static text language issue

Post by justyna_i »

Hello,

I am trying to print my content to PDF with my own customized plugin. So I changed in DITAmap root:
<bookmap xml:lang="fi">

After that it seems that the dita-ot is using some other settings to produce the pdf than the ones in my plugin: it is using different images for note/caution/warning than I specified in my own plugin. I also don't want the "Chapter 1" phrase in there.
I attach screenshot example:
example_en.png
example_en.png (41.4 KiB) Viewed 1638 times
example_fi.png
example_fi.png (34.94 KiB) Viewed 1638 times
I don't understand why when in my plugin word "chapter" does not show, it shows after changing the language.
Can you help?
justyna_i
Posts: 33
Joined: Mon Oct 08, 2018 12:16 pm

Re: Custom pdf plugin - static text language issue

Post by justyna_i »

Also the font of the header is a bit different.. Why do only some settings stay from my own plugin and some from original base pdf?
example_en2.png
example_en2.png (41.99 KiB) Viewed 1634 times
example_fi2.png
example_fi2.png (43.17 KiB) Viewed 1634 times
Radu
Posts: 9046
Joined: Fri Jul 09, 2004 5:18 pm

Re: Custom pdf plugin - static text language issue

Post by Radu »

Hi,

Most DITA OT PDF customization plugins use common stylesheets from the base PDF plugin. It's hard to tell what the problem is without seeing how your plugin is constructed.
For example if for the note caution icon you have modified the path in the "vars/en.xml" you probably need to also create an "fi.xml" next to it and modify the value also there.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
justyna_i
Posts: 33
Joined: Mon Oct 08, 2018 12:16 pm

Re: Custom pdf plugin - static text language issue

Post by justyna_i »

The plugin was created by a subcontractor and it has a lot of unnecessary files, parameters and settings in double places (it was created by a plugin generator and later heavily modified) - I would prefer it done from scratch but we did not know how they would build it. The plugin generator automatically creates some customized plugin with altered parameters but also adds a lot content and files.

It is very difficult to modify anything in there.

Do you have any idea how to get rid of the "chapter 1" from the pdf?
Radu
Posts: 9046
Joined: Fri Jul 09, 2004 5:18 pm

Re: Custom pdf plugin - static text language issue

Post by Radu »

If you look in this XML configuration file OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT3.x/plugins/org.dita.pdf2/cfg/common/vars/en.xml it contains a variable like:

Code: Select all

  <variable id="Chapter with number">Chapter <param ref-name="number"/></variable>
The entire en.xml (or in your case the fi.xml) could be overwritten from the plugin customization and the variable contents could be set to empty.
Or instead of publishing a DITA bookmap you would convert it to a regular DITA Map for which by default the publishing engine does not show "Chapter" labels in the PDF output.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
justyna_i
Posts: 33
Joined: Mon Oct 08, 2018 12:16 pm

Re: Custom pdf plugin - static text language issue

Post by justyna_i »

Thank you Radu for your help!

I found all needed places and made changes and now everything looks ok.
Post Reply