Usage of high resolution images in PDF

B-E-N
Posts: 120
Joined: Thu Mar 24, 2016 5:54 pm

Usage of high resolution images in PDF

Post by B-E-N » Wed Nov 07, 2018 5:57 pm

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

B-E-N
Posts: 120
Joined: Thu Mar 24, 2016 5:54 pm

Re: Usage of high resolution images in PDF

Post by B-E-N » Wed Nov 07, 2018 6:43 pm

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.

Radu
Posts: 6341
Joined: Fri Jul 09, 2004 5:18 pm

Re: Usage of high resolution images in PDF

Post by Radu » Fri Nov 09, 2018 12:55 pm

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

B-E-N
Posts: 120
Joined: Thu Mar 24, 2016 5:54 pm

Re: Usage of high resolution images in PDF

Post by B-E-N » Fri Nov 09, 2018 12:59 pm

Thanks Radu. The PDF from DITA using CSS feature has me interested for a while. This is probably another reason to consider this.

xephon
Posts: 98
Joined: Mon Nov 24, 2014 1:49 pm
Location: Münster/Germany

Re: Usage of high resolution images in PDF

Post by xephon » Sat Nov 10, 2018 11:55 am

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
Join the DOCTALES DITA development team :arrow: https://doctales.atlassian.net/wiki

Post Reply