PDF: Inline images centered

B-E-N
Posts: 116

PDF: Inline images centered

Wed Aug 15, 2018 5:50 pm

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
Costin
Posts: 428

Re: PDF: Inline images centered

Thu Aug 16, 2018 10:27 am

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
Costin Sandoi
oXygen XML Editor and Author Support
B-E-N
Posts: 116

Re: PDF: Inline images centered

Thu Aug 16, 2018 10:53 am

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?
Radu
Posts: 5813

Re: PDF: Inline images centered

Mon Aug 20, 2018 10:53 am

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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Return to “DITA (Editing and Publishing DITA Content)”

Who is online

Users browsing this forum: No registered users and 2 guests