Border has unneccesaty padding

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

Border has unneccesaty padding

Post 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?
Image
Costin
Posts: 833
Joined: Mon Dec 05, 2011 6:04 pm

Re: Border has unneccesaty padding

Post 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.

Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support
rjcbop
Posts: 56
Joined: Wed Aug 08, 2018 10:23 pm

Re: Border has unneccesaty padding

Post 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?
Dan
Posts: 501
Joined: Mon Feb 03, 2003 10:56 am

Re: Border has unneccesaty padding

Post by Dan »

Hello,

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: https://groups.google.com/forum/#!forum/dita-ot-users
- file a bug to the DITA-OT https://github.com/dita-ot/dita-ot
- send us a sample using the technical support channel. We will try to take a look at it. https://www.oxygenxml.com/techSupport.html

Many regards,
Dan
rjcbop
Posts: 56
Joined: Wed Aug 08, 2018 10:23 pm

Re: Border has unneccesaty padding

Post by rjcbop »

Many thanks for the informative response Dan.
Post Reply