Page 1 of 1

PDF: Inline images centered

Posted: Wed Aug 15, 2018 5:50 pm
by Anonymous1
Hello,

we are using a lot of inline images in our documentations. We use mostly small icons but space is often an issue. Some icons can only be reduced in size to a certain extend until too many information would be lost. That's why we would like to use all the space we have for displaying inline images.

But there is a problem in the PDF output. Inline images are placed on the base line. This way we lose almost some space that would be available. We would prefer to have inline images use the full text height.

See wikipedia to understand what I mean: https://en.wikipedia.org/wiki/Ascender_(typography)

We want the inline image to go from the descent to the ascent. At the moment it goes from the base line to the ascent.

In WebHelp Responsive, everything works as intended. Is there a way to make the PDF output of inline images look like the WebHelp output?

Thanks,
Benjamin

Re: PDF: Inline images centered

Posted: Thu Aug 16, 2018 10:27 am
by Costin
Hi B-E-N,

Indeed, there seems to be a discrepancy between the WebHelp output and PDF output.
I logged this in our internal issues tracking system to investigate and see if there is something we could do on our side to improve this.

Meanwhile, as a workaround you could use the "vertical-align: sub;" property in your customization CSS.

Code: Select all

*[class ~= "topic/image"][placement='inline']{
vertical-align:sub;
}
Whenever you need to style elements to look in the PDF as in HTML / WebHelp, you could just identify the specific element's selector, using the CSS inspector of your internet browser. Please see:
https://www.oxygenxml.com/doc/versions/ ... =debugging

Regards,
Costin

Re: PDF: Inline images centered

Posted: Thu Aug 16, 2018 10:53 am
by Anonymous1
Thank you for investigating this.

Regarding your workaround I should have given more information. We use a custom framework with Oxygen 19 (soon 20.1) and use Apache FOP as our formatter. This is why we cannot use a custom CSS at the moment.

Is there a workaround for FOP?

Re: PDF: Inline images centered

Posted: Mon Aug 20, 2018 10:53 am
by Radu
Hi Benjamin,

There is a baseline-shift attribute which seems to be available for the "fo:external-graphic" XSL-FO element:

https://www.w3.org/TR/xsl11/#baseline-shift

so maybe you could experiment with that, I do not know if the Apache FOP processor has support for it or not.
Maybe you can also register and ask around on the DITA Users List (Yahoo Group), they may have a better suggestion than mine.

Regards,
Radu