cutting right edge of image in PDF output
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 91
- Joined: Tue Jul 17, 2018 6:57 am
cutting right edge of image in PDF output
Post by msambasiva »
Hi
DITA-OT 2.4.6
Some how, few images are cutting right edge in the PDF output .
Tried to set the attribtes as below. But nothing helped me on this issue. Could you suggest any clue?
dita-ot-2.4.6\plugins\my.dita.pdf\cfg\fo\attrs\commons-attr.xsl
Thanks,
Samba.
DITA-OT 2.4.6
Some how, few images are cutting right edge in the PDF output .
Tried to set the attribtes as below. But nothing helped me on this issue. Could you suggest any clue?
dita-ot-2.4.6\plugins\my.dita.pdf\cfg\fo\attrs\commons-attr.xsl
Thanks,
Samba.
Code: Select all
<xsl:attribute-set name="image__block">
<xsl:attribute name="padding-bottom">20pt</xsl:attribute>
<xsl:attribute name="padding-top">10pt</xsl:attribute>
<xsl:attribute name="start-indent">inherit</xsl:attribute>
<!-- samba added to fix the image too big in PDF guide -->
<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>
<xsl:attribute-set name="image__inline">
<xsl:attribute name="vertical-align">middle</xsl:attribute>
<!-- samba added to fix the image too big in PDF guide -->
<xsl:attribute name="content-width">auto</xsl:attribute>
<xsl:attribute name="content-height">auto</xsl:attribute>
<xsl:attribute name="width">auto</xsl:attribute>
<xsl:attribute name="scaling">uniform</xsl:attribute>
</xsl:attribute-set>
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: cutting right edge of image in PDF output
Hi Samba,
If you set in the transformation scenario the "clean.temp" parameter to "yes", then publish, in the transformation temporary files folder you should find the "topic.fo" XSL-FO file from which the PDF was created. If you open it in Oxygen and look at the image reference, does it contain the changes you made in the customization XSLTs?
Regards,
Radu
If you set in the transformation scenario the "clean.temp" parameter to "yes", then publish, in the transformation temporary files folder you should find the "topic.fo" XSL-FO file from which the PDF was created. If you open it in Oxygen and look at the image reference, does it contain the changes you made in the customization XSLTs?
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 91
- Joined: Tue Jul 17, 2018 6:57 am
Re: cutting right edge of image in PDF output
Post by msambasiva »
Thanks Radu for dubbing steps.
Looks the attribute changes (width=auto & width=100 under image__inline)are taking place in topic.fo. It's throwing error saying that content-width, content-height and scaling are not allowed as shown in the attached screenshot.
width=auto :
<fo:inline content-height="auto" content-width="auto" scaling="uniform" vertical-align="middle" width="auto">
<fo:external-graphic src="url('file:/C:/dita-ot-2.4.6/sdl-content/out2/images/GUID-8D654C41-960B-4896-9AFC-2620067BC08B-default.png')"/>
</fo:inline>
width=100 :
<fo:inline content-height="auto" content-width="auto" scaling="uniform" vertical-align="middle" width="100">
<fo:external-graphic src="url('file:/C:/dita-ot-2.4.6/sdl-content/out2/images/GUID-8D654C41-960B-4896-9AFC-2620067BC08B-default.png')"/>
</fo:inline>
Please suggest how to debug the attribute changes under image__block set.
Thanks,
Samba.
Looks the attribute changes (width=auto & width=100 under image__inline)are taking place in topic.fo. It's throwing error saying that content-width, content-height and scaling are not allowed as shown in the attached screenshot.
width=auto :
<fo:inline content-height="auto" content-width="auto" scaling="uniform" vertical-align="middle" width="auto">
<fo:external-graphic src="url('file:/C:/dita-ot-2.4.6/sdl-content/out2/images/GUID-8D654C41-960B-4896-9AFC-2620067BC08B-default.png')"/>
</fo:inline>
width=100 :
<fo:inline content-height="auto" content-width="auto" scaling="uniform" vertical-align="middle" width="100">
<fo:external-graphic src="url('file:/C:/dita-ot-2.4.6/sdl-content/out2/images/GUID-8D654C41-960B-4896-9AFC-2620067BC08B-default.png')"/>
</fo:inline>
pdf-image-scaling-issue.png
Could you suggest any further clue? Please suggest how to debug the attribute changes under image__block set.
Thanks,
Samba.
You do not have the required permissions to view the files attached to this post.
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: cutting right edge of image in PDF output
Hi,
I think you should try to place the attributes directly on the fo:external-graphic element:
https://stackoverflow.com/questions/622 ... age-in-fop
Regards,
Radu
I think you should try to place the attributes directly on the fo:external-graphic element:
https://stackoverflow.com/questions/622 ... age-in-fop
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 91
- Joined: Tue Jul 17, 2018 6:57 am
Re: cutting right edge of image in PDF output
Post by msambasiva »
Yes.It's working by setting directly on the fo:external-graphic element as you suggested.
<xsl:otherwise>
<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:otherwise>
</xsl:choose>
</fo:external-graphic>
Thanks a lot.
Samba.
<xsl:otherwise>
<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:otherwise>
</xsl:choose>
</fo:external-graphic>
Thanks a lot.
Samba.
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