- From: Norm Tovey-Walsh <ndw@nwalsh.com>
- Date: Sat, 08 Mar 2025 09:41:20 +0000
- To: Wendell Piez <wapiez@wendellpiez.com>
- Cc: XProc Dev <xproc-dev@w3.org>
Wendell Piez <wapiez@wendellpiez.com> writes:
> According to https://spec.xproc.org/master/head/paged-media/diff.html#c.xsl-formatter it appears my processor would have to support an "image/png" content type on the p:xsl-formatter step.
I hadn’t worked out what media types FOP supports correctly. The next release of XML Calabash will add support for
image/png
image/tiff
application/X-fop-areatrea
application/vnd.hp-PCL
in addition to the currently supported content types:
application/pdf
application/postscript
application/x-afp
application/rtf
text/plain
Conspicuous by its absence is image/svg+xml. Unfortunately, that’s currently in the FOP “sandbox”, not in the general release.
I’ll add it to the list of media types that the step supports, so if you want to build your own version of FOP, enable the sandbox formats, and try it out, you can.
> The 'parameters' option also offers nothing, or nothing obvious. While FOP provides runtime switches, in other words, it is not altogether clear how (in this case) it would or should be configured to do its thing.
The XML Calabash configuration parameters for FOP are documented here:
https://docs.xmlcalabash.com/reference/current/p-xsl-formatter.html#xsl-apachefop
So, for example, this:
<p:xsl-formatter content-type="image/png"
parameters="map {'TargetResolution': 300 }">
…
</p:xsl-formatter>
will produce a 300dpi image/png rendering.
Be seeing you,
norm
--
Norm Tovey-Walsh <ndw@nwalsh.com>
https://norm.tovey-walsh.com/
> From a programmer's point of view, the user is a peripheral that types
> when you issue a read request.--P. Williams
Received on Saturday, 8 March 2025 09:41:28 UTC