Images not scaling in PDF output

73 views
Skip to first unread message

Carole Girard

unread,
Jan 8, 2020, 8:54:52 AM1/8/20
to DITA-OT Users
Hello,

we are moving from Dita-OT 1.8 to Dita-OT 3.2.

We have rebuilt our plugin from scratch to customise the layout of our PDFs.  When came up with a problem that I can't figure out.

The images are not rendered in the PDF with the width specified in the xml.

for example: <image href="../_Image/Workflow.png" width="370"
        id="image_y2h_y11_4y" placement="inline"/>

I think we need instructions in the commons.xsl file, but our previous code does not work.

Anyone has an idea of what is missing?

Ron Wheeler

unread,
Jan 8, 2020, 10:27:56 AM1/8/20
to dita-o...@googlegroups.com
 <image placement="inline" align="right" width="208px" height="320px"
  href="../images/darwin_library_of_congress.jpg">

Taken from a discussion on images from the web.

Have you tried adding px to the width specification -width="370px".
--
You received this message because you are subscribed to the Google Groups "DITA-OT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dita-ot-user...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/dita-ot-users/f06ceaa1-b6d8-4570-a07b-7b977cb75947%40googlegroups.com.
-- 
Ron Wheeler
Artifact Software
438-345-3369
rwhe...@artifact-software.com

Radu Coravu

unread,
Jan 9, 2020, 12:15:14 AM1/9/20
to Ron Wheeler, DITA-OT Users
Hi Carole,

Maybe you can search in the "org.dita.pdf2" plugin XSLT stylesheet for the XSLT template where the "topic/image" DITA element is processed.
Then search also in your XSLT customizations to see if you are overwriting the same template.
Then compare the two versions.

Regards,
Radu

AJ Côté

unread,
Jan 10, 2020, 4:26:35 AM1/10/20
to DITA-OT Users
Hello Carole,

Did you have a different DPI resolution for the image? If you also have this problem with the pdf2 output, I guess the DPI resolution was different in your old DITA-OT 1.8.

In DITA-OT 3.X, the path is: org.dita.pdf2.fop\cfg\fop.xconf
and there is two elements: source-resolution and target-resolution. By default, in vanilla DITA-OT 3.X, it is set to 72dpi.

In my old DITA-OT, bundled in Oxygen 17, it was there: org.dita.pdf2\fop\conf\fop.xconf, and both elements were set to 120.
Also, in Oxygen 21 (bundled with DITA-OT 3.X), the source is set to 120 and the target to 600.


I guess the best way is to avoid the pixel dimension and use a "physical" length (inch, mm). That way, the DPI resolution won't bother anymore.
Reply all
Reply to author
Forward
0 new messages