SVG files not scaling properly in PDF publishing
Post here questions and problems related to editing and publishing DITA content.
SVG files not scaling properly in PDF publishing
We have a set of documents that use SVG files to overlay callouts onto screen shots. The screen shots are PNG format, embedded in the SVG.
Opened in Inkscape, Oxygen (19.1), Chrome, or Firefox, the SVG file looks right. Callouts are positioned properly.
Published to PDF, the callouts and screenshots get scaled differently, so the overall piece looks wrong.
This is probably a FOP issue, but any ideas about how to fix it are appreciated.
Opened in Inkscape, Oxygen (19.1), Chrome, or Firefox, the SVG file looks right. Callouts are positioned properly.
Published to PDF, the callouts and screenshots get scaled differently, so the overall piece looks wrong.
This is probably a FOP issue, but any ideas about how to fix it are appreciated.
Re: SVG files not scaling properly in PDF publishing
Thanks for the reply, Dan.
Using DITA-OT 2.5.4 with a custom PDF plugin. We get the same results from both Oxygen and Astoria (our CMS).What scenario are you using to transform your documents?
Yes. Here's the code for one, eliding the big wad of Base64-encoded bitmap. As I said, they look fine anywhere but in the PDF.Your SVGs have information about their size?
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:stl="http://stilo.com/migrate" version="1.1" width="674.64567" height="280.62992">
<style type="text/css">
.CR-CalloutFR-ABEC6709 {
line-height: 8pt;
font-name: Open Sans;
font-size: 8pt;
}
</style>
<g>
<image id="ID4-503"
xlink:href="data:image/png;base64, **70K worth**
"
width="14.526cm" height="6.906cm" x="110.96693" y="12.32126"/>
<text x="12.01890" y="69.78268" class="CR-CalloutFR-ABEC6709">
<tspan font-size="8pt">XML Config </tspan>
</text>
<text x="12.01890" y="85.78268" font-size="8pt" class="CR-CalloutFR-ABEC6709">Files panel</text>
<text x="12.01890" y="152.44094" class="CR-CalloutFR-ABEC6709">
<tspan font-size="8pt">Component </tspan>
</text>
<text x="12.01890" y="168.44094" font-size="8pt" class="CR-CalloutFR-ABEC6709">tree</text>
<text x="0.00000" y="221.08976" class="CR-CalloutFR-ABEC6709">
<tspan font-size="8pt">Configuration </tspan>
</text>
<text x="0.00000" y="237.08976" font-size="8pt" class="CR-CalloutFR-ABEC6709">File</text>
<line fill-opacity="0" stroke="blue" stroke-width="1.0pt" x1="84.01890" y1="69.31654" x2="108.01890" y2="69.31654"/>
<line fill="none" stroke="blue" stroke-width="1.0pt" x1="84.01890" y1="153.33543" x2="120.00000" y2="153.33543"/>
<line fill="none" stroke="blue" stroke-width="1.0pt" x1="84.01890" y1="225.33543" x2="252.01890" y2="225.33543"/>
</g>
</svg>
Re: SVG files not scaling properly in PDF publishing
Hm. That last post got stuck in Moderator Limbo.
Replacing the embedded PNG file with the original BMP fixed the problem. I'm not sure if the converter (ImageMagick) introduced a problem (invisible to everything but the publishing part, mind you), or if FOP (or PDF) just prefers to work with uncompressed images when embedded.
I still want to get to the bottom of this, but at least now I have a way forward.
Replacing the embedded PNG file with the original BMP fixed the problem. I'm not sure if the converter (ImageMagick) introduced a problem (invisible to everything but the publishing part, mind you), or if FOP (or PDF) just prefers to work with uncompressed images when embedded.
I still want to get to the bottom of this, but at least now I have a way forward.
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