Page 1 of 1

Border has unneccesaty padding

Posted: Thu Jan 17, 2019 12:58 pm
by anna_craneo
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?

Re: Border has unneccesaty padding

Posted: Wed Jan 23, 2019 6:13 pm
by Costin
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.


Re: Border has unneccesaty padding

Posted: Thu Mar 14, 2019 6:50 pm
by rjcbop
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?

Re: Border has unneccesaty padding

Posted: Mon Mar 18, 2019 3:01 pm
by Dan

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,

Re: Border has unneccesaty padding

Posted: Tue Mar 19, 2019 6:22 pm
by rjcbop
Many thanks for the informative response Dan.