Border has unneccesaty padding

Having trouble installing <oXygen/>? Got a bug to report? Post it all here.
Posts: 33
Joined: Tue Feb 20, 2018 2:51 pm

Border has unneccesaty padding

Post by anna_craneo » Thu Jan 17, 2019 12:58 pm

Hi, I'm using DITA-PDF WYSIWYG transformation with custom CSS.
I want to add a border around an image, this is what I do

Code: Select all

*[class ~= "topic/fig"] > [class ~= "topic/image"][placement = 'break'] {
border: 1px solid #EFF1F2;

The border is added but in some cases, it is far out the picture - like in the example. This is not the expected behavior, I need it strictly around the image. How can I get it via CSS?

Posts: 719
Joined: Mon Dec 05, 2011 6:04 pm

Re: Border has unneccesaty padding

Post by Costin » Wed Jan 23, 2019 6:13 pm

Hi Anna,

There were indeed some issues with the borders set through CSS on images, when using the deprecated DITA Map PDF - based on DITA and CSS (WYSIWYG) transformation from oXygen.
We tried to fix this issues and implemented a fix in our internal development stream, for the next major version of oXygen.

Meanwhile, is there a specific reason for which you want to use that specific transformation scenario?
Please note that it is deprecated and starting with the next version 21, it won't be available by default in the transformation scenarios list from oXygen (could be added though manually if the user insists on using it).
As long as you do not have any specific reason to use that scenario, I strongly recommend using the DITA Map PDF - based on HTML5 & CSS transformation scenario instead, as I tested and it seems this issue does not occurs for that transformation.

Costin Sandoi
oXygen XML Editor and Author Support

Posts: 17
Joined: Wed Aug 08, 2018 10:23 pm

Re: Border has unneccesaty padding

Post by rjcbop » Thu Mar 14, 2019 6:50 pm

We're having an issue with using @scalefit in conjunction with automatically applying a border to an image and finding that we're getting whitespace between either the right edge of the image and the right-hand border or the bottom edge of the image and the bottom border. For reference, we have a custom PDF transformation and we're applying the border by specifying the relevant attributes on the <fo:external-graphic> element. Also, we're using the standard code for @scalefit from the placeImage template in topic.xsl. Would this behavior also be addressed in the oXygen 21 org.dita.pdf2 transform?

Posts: 476
Joined: Mon Feb 03, 2003 10:56 am

Re: Border has unneccesaty padding

Post by Dan » Mon Mar 18, 2019 3:01 pm


This thread is about the CSS PDF customization (oXygen Specific), not about the standard transformation provided by the PDF2 DITA-OT plugin.

If you have problems with the PDF2 plugin you can:

- request details on the DITA users list:!forum/dita-ot-users
- file a bug to the DITA-OT
- send us a sample using the technical support channel. We will try to take a look at it.

Many regards,

Posts: 17
Joined: Wed Aug 08, 2018 10:23 pm

Re: Border has unneccesaty padding

Post by rjcbop » Tue Mar 19, 2019 6:22 pm

Many thanks for the informative response Dan.

Post Reply