MaDeuce
unread,Feb 26, 2012, 9:11:21 PM2/26/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Pisa XHTML2PDF Support
I am new to xhtml2pdf and hope to be able to use it for bulk
conversion of html to pdf. I have two newb questions...
1) After installing via pip in a virtualenv, I attempted to convert
pisa-en.html to pdf via: 'xhtml2pdf pisa-en.html'. Doing so produces
an exception:
"ValueError: can't find template('regular')".
The exception goes away and PDF is produced if I edit pisa-en.html and
remove the line containing '<pdf:nexttemplate name="regular"/>'.
What am I missing here?
2) My goal is to be able to convert HTML that was created by MS Word.
I know that's disgusting, but they are legacy files and have to be
converted. I get errors on these as well, I assume having to do with
font incompatibility. For example:
File "/Users/khe/.virtualenvs/pat/lib/python2.7/site-packages/
xhtml2pdf/context.py", line 170, in atFontFace
src = self.c.getFile(data["src"])
KeyError: 'src'
I don't mind spending the time to dig in and find out what's going
on. However, before doing so, I'd really appreciate it if someone
familiar with xhtml2pdf could weigh in and let me know the ultimate
goal is reasonable or not. I'd hate to spend a couple of days on it,
only to find out that the MS generated HTML is hopeless.
Thanks very much,
--Ma