Page 1 of 1

Usage of high resolution images in PDF

Posted: Wed Nov 07, 2018 5:57 pm
by Anonymous1
Hello,

in the past, we created screenshots with SnagIt on Windows in 96 DPI and inserted them into our topics. Now we would like to create screenshots on Mac with retina display. This gives us a much more detailed screenshot in 144 DPI. When we convert those high resolution images to 96 DPI, it gets blurry and grainy because of the compression. So I would rather keep using the high resolution screenshots and have them processed to the right size in the transformation.

What would be the best practice to use high resolution images in the PDF and Webhelp output. It would be great if screenshots never exceed a certain width in PDF. In WebHelp, the images already adopt to the column width. So I guess this is only a question for PDF.

Thanks,
Benjamin

Re: Usage of high resolution images in PDF

Posted: Wed Nov 07, 2018 6:43 pm
by Anonymous1
I tried to make use of the scalefit attribute. This works to fit very large screenshots nicely in the available space (that is the text column) but does not work well for small screenshots. Small screenshots are stretched to fit the space.

I would rather not have a system where authors have to decide for each screenshot individually which attribute value needs to be set in order for the screenshot to come out in the right size.

I could imagine something like this:
- Large screenshots that would run over the edge of the page would be resized to make use of the available space. So scalefit would be probably of good use here.
- But small screenshots that fit in the column anyway should not be stretched in any way.

Re: Usage of high resolution images in PDF

Posted: Fri Nov 09, 2018 12:55 pm
by Radu
Hi,

I'm not sure how this should be best handled for the classic PDF output, maybe you could ask around on the DITA Users List.
About 1-2 years ago we added new transformation types to produce PDF from DITA using CSS:

https://www.oxygenxml.com/doc/versions/ ... ation.html

Using CSS, what you want can be achieved by setting a max-width on the image element:

https://www.oxygenxml.com/doc/versions/ ... mages.html

Regards,
Radu

Re: Usage of high resolution images in PDF

Posted: Fri Nov 09, 2018 12:59 pm
by Anonymous1
Thanks Radu. The PDF from DITA using CSS feature has me interested for a while. This is probably another reason to consider this.

Re: Usage of high resolution images in PDF

Posted: Sat Nov 10, 2018 11:55 am
by xephon
Hi Ben,

please try, if the following attribute set fixes the scaling issues:

<xsl:attribute-set name="blockImage"> <xsl:attribute name="content-width">scale-to-fit</xsl:attribute> <xsl:attribute name="content-height">100%</xsl:attribute> <xsl:attribute name="width">100%</xsl:attribute> <xsl:attribute name="scaling">uniform</xsl:attribute> </xsl:attribute-set>

See also dita-ot issue #2663

Greetings