Quote:
Originally Posted by Jellby
Hmm... I guess I had read it backwards. If I now understand it correctly, the problem is I was generating the pathnames with the OS-specific separator ("\" for windows), but zipfile's getinfo() wants them with "/" always? What I don't quite understand then is why prince works when you feed it the filenames with "/".
|
I guess Prince is smart enough to take care of slashes. As a command-line parameters, those file paths are coming into the Prince as strings, right? And Prince is free to do with those strings whatever it wants. And if Prince is, like, "hey, those strings supposed to be file paths, but I am under Windows now, so I'd better make sure all slashes are right ones... I mean wrong ones..." - that would explain it, right?
Quote:
Originally Posted by Jellby
Could you run the attached file (load an ePUB and convert it to PDF) and copy whatever it outputs to the terminal? I'd like to see what's happening exactly to the file paths, or maybe you can explain it
|
Here you are:
Code:
OPS\cover.xhtml
OPS\ch1.xhtml
OPS\ch2.xhtml
OPS\ch3.xhtml
OPS\ch4.xhtml
OPS\ch5.xhtml
OPS\ch6.xhtml
OPS\ch7.xhtml
OPS\ch8.xhtml
OPS\ch9.xhtml
OPS\ch10.xhtml
OPS\ch11.xhtml
OPS\ch12.xhtml
OPS\ch13.xhtml
OPS\ch14.xhtml
OPS\ch15.xhtml
OPS\ch16.xhtml
OPS\ch17.xhtml
OPS\ch18.xhtml
OPS\ch19.xhtml
OPS\ch20.xhtml
OPS\ch21.xhtml
OPS\ch22.xhtml
OPS\ch23.xhtml
OPS\ch24.xhtml
OPS\ch25.xhtml
OPS\ch26.xhtml
OPS\ch27.xhtml
OPS\ch28.xhtml
OPS\ch29.xhtml
OPS\ch30.xhtml
OPS\ch31.xhtml
OPS\ch32.xhtml
OPS\ch33.xhtml
['C:\\Program Files\\Prince\\Engine\\bin\\prince.exe', '-v', '-s', 'c:\\users\\myname\\appdata\\local\\temp\\tmpxt9o1b\\tmp6gghkl', '-o', 'C:\\Utils\\epub2pdf
\\epub2pdf.pdf', u'OPS/cover.xhtml', u'OPS/ch1.xhtml', u'OPS/ch2.xhtml', u'OPS/c
h3.xhtml', u'OPS/ch4.xhtml', u'OPS/ch5.xhtml', u'OPS/ch6.xhtml', u'OPS/ch7.xhtml
', u'OPS/ch8.xhtml', u'OPS/ch9.xhtml', u'OPS/ch10.xhtml', u'OPS/ch11.xhtml', u'O
PS/ch12.xhtml', u'OPS/ch13.xhtml', u'OPS/ch14.xhtml', u'OPS/ch15.xhtml', u'OPS/c
h16.xhtml', u'OPS/ch17.xhtml', u'OPS/ch18.xhtml', u'OPS/ch19.xhtml', u'OPS/ch20.
xhtml', u'OPS/ch21.xhtml', u'OPS/ch22.xhtml', u'OPS/ch23.xhtml', u'OPS/ch24.xhtm
l', u'OPS/ch25.xhtml', u'OPS/ch26.xhtml', u'OPS/ch27.xhtml', u'OPS/ch28.xhtml',
u'OPS/ch29.xhtml', u'OPS/ch30.xhtml', u'OPS/ch31.xhtml', u'OPS/ch32.xhtml', u'OP
S/ch33.xhtml']