CSS-based PDF: Changes to DPI
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 167
- Joined: Tue Mar 06, 2018 1:34 am
CSS-based PDF: Changes to DPI
My source image is 400x300, with both horizontal and vertical resolutions of 300 DPI.
When I transform using the CSS-PDF scenario, the images get changed to 140 DPI. This makes the images bigger than I want in the PDF. I verified this by:
* Confirming that the merged file had links to the images with the correct DPI
* Extracting the image from the PDF and verifying that its DPI had been changed
When I transform using the CSS-PDF scenario, the images get changed to 140 DPI. This makes the images bigger than I want in the PDF. I verified this by:
* Confirming that the merged file had links to the images with the correct DPI
* Extracting the image from the PDF and verifying that its DPI had been changed
-
- Posts: 501
- Joined: Mon Feb 03, 2003 10:56 am
Re: CSS-based PDF: Changes to DPI
Hello,
What image format are you using? Can you send us a sample image file? You are using it in the topic content, or to decorate the page background or headers?
We have tested with PNG images (created with GIMP) and it works fine.
For more information see the "Image Resolution" section from https://www.oxygenxml.com/doc/versions/ ... phics.html
Regards,
Dan
What image format are you using? Can you send us a sample image file? You are using it in the topic content, or to decorate the page background or headers?
We have tested with PNG images (created with GIMP) and it works fine.
For more information see the "Image Resolution" section from https://www.oxygenxml.com/doc/versions/ ... phics.html
Regards,
Dan
-
- Posts: 167
- Joined: Tue Mar 06, 2018 1:34 am
Re: CSS-based PDF: Changes to DPI
OK, I fixed this, but still feel like I shouldn't have had to do this.
My jpg image is specified as 300 dpi. The pdf transform is changing the pdi. I used the following css to force the pdi to 300 dpi:
*[class ~= "topic/image"] {
image-resolution: 300dpi;
}
My jpg image is specified as 300 dpi. The pdf transform is changing the pdi. I used the following css to force the pdi to 300 dpi:
*[class ~= "topic/image"] {
image-resolution: 300dpi;
}
-
- Posts: 846
- Joined: Mon Dec 05, 2011 6:04 pm
Re: CSS-based PDF: Changes to DPI
Hello,
I just checked the image size and even the image in the PDF you obtained (in the output you sent us by email) has the right PPI - 300.
BTW, "DPI" (which stands for Dots Per Inch and is only used to express how many dots of ink per inch can be printed, depending on the quality of each physical printer) is incorrectly used by software companies to refer the size of an image in pixels.
I also tried running both the DITA Map PDF - based on CSS predefined scenarios (with/without HTML5), with no customization CSS and obtained a perfectly sized image of 300 x 300 ppi in both cases.
However, I am using Adobe Acrobat Reader DC - version 2018.011.20055 so I could only copy the image (not save as) from the PDF in a third party software then saved it without altering its dimension or resolution.
Could you try to publish your PDF using the predefined scenario, without using a customization CSS at all and see if this changes anything?
In case that even when using the out-of-the-box scenario, after you save the image you notice that it has incorrect PPI (BTW, what exactly are you using to inspect the PPI of the saved image?), then this could be related to the PDF viewer you are using to save the image from.
More specific, you may be using a different version of Acrobat Reader (probably the Professional edition?!) and the issue could occur during the saving of the image (could be related on how the image is saved by your PDF viewer software, so you should check if there are any options/preferences at save time).
Best Regards,
Costin
I just checked the image size and even the image in the PDF you obtained (in the output you sent us by email) has the right PPI - 300.
BTW, "DPI" (which stands for Dots Per Inch and is only used to express how many dots of ink per inch can be printed, depending on the quality of each physical printer) is incorrectly used by software companies to refer the size of an image in pixels.
I also tried running both the DITA Map PDF - based on CSS predefined scenarios (with/without HTML5), with no customization CSS and obtained a perfectly sized image of 300 x 300 ppi in both cases.
However, I am using Adobe Acrobat Reader DC - version 2018.011.20055 so I could only copy the image (not save as) from the PDF in a third party software then saved it without altering its dimension or resolution.
Could you try to publish your PDF using the predefined scenario, without using a customization CSS at all and see if this changes anything?
In case that even when using the out-of-the-box scenario, after you save the image you notice that it has incorrect PPI (BTW, what exactly are you using to inspect the PPI of the saved image?), then this could be related to the PDF viewer you are using to save the image from.
More specific, you may be using a different version of Acrobat Reader (probably the Professional edition?!) and the issue could occur during the saving of the image (could be related on how the image is saved by your PDF viewer software, so you should check if there are any options/preferences at save time).
Best Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support
oXygen XML Editor and Author Support
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service