On 07/04/2014 11:06 AM, Mike Dodds wrote:

Is there a recommended way to process images differently in pdfs and
webhelp output from from ditac?

What I’d like to achieve is that all images are 100% in webhelp, but in
pdfs most are 60%, but some (icons for example) remain at 100%.

I’ve used the scalefit attribute set to Yes, and this gives a good
result in pdfs, but not in webhelp.

Probably the simplest solution is to be able to override scalefit when
converting to webhelp.


I don't know the recommended way. I can just explain what I do in my own DITA documents.

In my own DITA documents, I want to use SVG images when I generate PDF, DOCX, etc, and to use PNG images when I generate HTML, Web Help, etc.

1) I add the same image twice in the DITA topic, one time in SVG format and another time in PNG format.

---
<fig frame="all" id="page_areas">
  <title>Page areas</title>

  <image align="center" href="images/page_areas.svg"
         otherprops="svg=yes" width="15cm"/>

  <image align="center" href="images/page_areas.png"
         otherprops="svg=no"/>
</fig>
---

Also notice the different values for the "otherprops" conditional processing attribute.

2) I've created these 2 .ditaval files:

svg.ditaval
---
<val>
  <prop action="exclude" att="otherprops" val="svg=no"/>
</val>
---

no_svg.ditaval
---
<val>
  <prop action="exclude" att="otherprops" val="svg=yes"/>
</val>
---

3) I generate the PDF as follows:

ditac -filter svg.ditaval out/manual.pdf manual.ditamap

I generate the WebHelp as follows:

ditac -filter no_svg.ditaval -format webhelp5 out/wh/_.html manual.ditamap

--
XMLmind DITA Converter Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/ditac-support

Reply via email to