Prince PDF Errors exporting a book imported from Lumen/OpenStax


#1

Pressbooks Version: 5.2
Server: RHEL7
PHP: 7.1
PHP MAX EXEC time: 600
PHP upload_max_filesize = 200M
PHP post_max_size = 200M
WordPress: 4.9.5
All themes at latest versions
Pressbooks PDF Export Method: Prince 11.3
Book Theme: McLuhan

Greetings:
We have a book that was imported from Lumen WXR XML into Pressbooks.
Prior to our update,this book exported to PDF successfully (at Pressbooks version 4.9)

We receive a “could not load input file” error from Prince when we process the book through Pressbooks.

I ran comparisons on the XML and CSS for the book, comparing them to other similar books that export successfully. I found no differences.

I debugged the XML and found Prince did not like a Line Separator Unicode character in the code. I stripped that out, also removed LF in the code. What is strange is that other books we publish have these characters in the XML.

That error disappeared, but we still received ‘failed to load input file’ errors.

I tried to process the XML via Prince command line (both with and without the stylesheet), and received more ‘robust’ errors:

[root@prodliblinux rawprincetests]# prince -s mcluhan.css IntroductiontoPsychologyPartIItabsremoved2.xml -o IntroductiontoPsychologyPartIItabsremoved2.pdf
prince: IntroductiontoPsychologyPartIItabsremoved2.xml:1: error: attributes construct error
prince: IntroductiontoPsychologyPartIItabsremoved2.xml:1: error: Couldn't find end of Start Tag rss line 1
prince: IntroductiontoPsychologyPartIItabsremoved2.xml:1: error: Extra content at the end of the document
prince: IntroductiontoPsychologyPartIItabsremoved2.xml: error: could not load input file
prince: error: failed to load all input documents

I can’t upload the XML file here, but I’d be happy to post or send it for ‘another pair of eyes’ . It looks like the problem lies in the RSS markup at the end of the XML file. Any thoughts?


#2

@rootl Can you email me the file? ned@pressbooks.com. Thanks.