Re: Aw: [xsl] PDF output - file can't be opened

Subject: Re: Aw: [xsl] PDF output - file can't be opened
From: "Michele R Combs mrrothen@xxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 23 Dec 2021 18:23:15 -0000
Cool!!  I have got Oxygen, so will give that a try.  It is kind of fun to go
through the raw XSL-FO, I didnbt know what it looked like.

Michele

From: Wendell Piez wapiez@xxxxxxxxxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Thursday, December 23, 2021 1:10 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: Aw: [xsl] PDF output - file can't be opened

Michele,

In case you are an oXygen XML user, FOP comes bundled and is available from
the middle tab of an XSLT Transformation Scenario - it is run as a
post-process, consuming the XML produced by the transformation (using the
XSL-FO vocabulary to which Martin refers).

If you have no oXygen, FOP is not difficult to run from the command line, as
described on the Apache web site.

Additionally, there are commercial XSL-FO engines available that support
features unavailable in FOP. Keep in mind that if is written to one of these
(and uses extension features, optional features etc), your XSL might not
produce the exact PDF expected using a different formatter. Beyond keeping
your eye on tracebacks for errors and warnings, the best way to defend against
this is by examining both the PDF output and even the XSL-FO XML intermediate,
to make sure things look tight.

Good luck -- Wendell



On Thu, Dec 23, 2021 at 11:32 AM Michele R Combs
mrrothen@xxxxxxx<mailto:mrrothen@xxxxxxx>
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx<mailto:xsl-list-service@xxxxxxxxxxxx
rytech.com>> wrote:
Hi Martin b

Ah.  So if I understand correctly, therebs an additional transformation
needed:  xml ==> xsl-fo ==> PDF.  I shall go and investigate this Apache FOP!

Thanks --

Michele

From: Martin Honnen martin.honnen@xxxxxx<mailto:martin.honnen@xxxxxx>
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx<mailto:xsl-list-service@xxxxxxxxxxxx
rytech.com>>
Sent: Thursday, December 23, 2021 11:27 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx<mailto:xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Aw: [xsl] PDF output - file can't be opened

XSLT produces XSL-FO , not PDF. To convert XSL-FO to PDF , use Apache FOP.

--
Diese Nachricht wurde von meinem Android Mobiltelefon mit GMX Mail gesendet.
Am 23.12.21, 17:19 schrieb "Michele R Combs
mrrothen@xxxxxxx<mailto:mrrothen@xxxxxxx>"
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx<mailto:xsl-list-service@xxxxxxxxxxxx
rytech.com>>:
Hi b

A colleague sent me a style sheet they use to convert XML to PDF.  Ibm using
saxon and running it using a command line in a batch file, with the command as
follows:

java.exe -cp saxon9he.jar net.sf.saxon.Transform -t
-s:"../other_peoples/bertha/VdM_EAD export.xml"
-xsl:"../other_peoples/bertha/at_MetModified.xsl"
-o:../other_peoples/bertha/test.pdf

When I run it using their XML, it successfully produces a PDF file but when I
try to open the file Adobe gives me this error:

Adobe Acrobat could not open btest.pdfb because it is either not a
supported file type or because the file has been damagedb&.

So: their XML, their XSL, my XSL processor and command line.  I can open the
output PDF file in Notepad and view all the fo:blocks and so on.  However,
when I attempt to open some other random PDF for comparison I just see a bunch
of random illegible stuff.   So Ibm thinking that my output is missing some
particular bit of info that makes the file a legit PDF.

What might be causing this problem?  Do I need to tweak the style sheet, for
example, or my command line to properly produce PDF?  Ibve never worked with
PDF files and donbt know much about them.

Thanks

Michele
+++++++++
Michele Combs | Lead Archivist
Special Collections Research Center
Visit our blog! library-blog.syr.edu/scrc/<http://library-blog.syr.edu/scrc/>
Syracuse University Libraries
222 Waverly Ave
Syracuse, New York 13244
t 315.443-2081 | e mrrothen@xxxxxxx<mailto:mrrothen@xxxxxxx> | w
scrc.syr.edu<http://scrc.syr.edu>
SYRACUSE UNIVERSITY
syr.edu<http://syr.edu>

XSL-List info and archive<http://www.mulberrytech.com/xsl/xsl-list>
EasyUnsubscribe<http://lists.mulberrytech.com/unsub/xsl-list/582271> (by
email)
XSL-List info and archive<http://www.mulberrytech.com/xsl/xsl-list>
EasyUnsubscribe<http://lists.mulberrytech.com/unsub/xsl-list/1127818> (by
email)
XSL-List info and archive<http://www.mulberrytech.com/xsl/xsl-list>
EasyUnsubscribe<http://lists.mulberrytech.com/unsub/xsl-list/174322> (by
email)


--
...Wendell Piez... ...wendell -at- nist -dot- gov...
...wendellpiez.com... ...pellucidliterature.org... ...pausepress.org...
...github.com/wendellpiez.<http://github.com/wendellpiez.>..
...gitlab.coko.foundation/wendell...
XSL-List info and archive<http://www.mulberrytech.com/xsl/xsl-list>
EasyUnsubscribe<http://lists.mulberrytech.com/unsub/xsl-list/1127818> (by
email<>)

Current Thread