Page 1 of 1

Custom pdf plugin - static text language issue

Posted: Tue Jun 30, 2020 1:52 pm
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 1642 times
example_fi.png
example_fi.png (34.94 KiB) Viewed 1642 times
I don't understand why when in my plugin word "chapter" does not show, it shows after changing the language.
Can you help?

Re: Custom pdf plugin - static text language issue

Posted: Tue Jun 30, 2020 1:58 pm
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 1638 times
example_fi2.png
example_fi2.png (43.17 KiB) Viewed 1638 times

Re: Custom pdf plugin - static text language issue

Posted: Wed Jul 01, 2020 7:24 am
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

Re: Custom pdf plugin - static text language issue

Posted: Wed Jul 01, 2020 9:01 am
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?

Re: Custom pdf plugin - static text language issue

Posted: Wed Jul 01, 2020 1:31 pm
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

Re: Custom pdf plugin - static text language issue

Posted: Thu Jul 02, 2020 10:45 am
by justyna_i
Thank you Radu for your help!

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