Does not convert after optimizing the PDF with GhostScript

78 views
Skip to first unread message

Mark Pawelek

unread,
Mar 1, 2019, 6:05:04 AM3/1/19
to pdf2htmlEX
After optimizing a pdf file with ghostscript, pdf2htmlEX not longer converts!

    gsWin64 -sDEVICE=pdfwrite -sOutputFile=out.pdf -dNOPAUSE -dBATCH in.pdf
    pdf2htmlEX --embed cfijo --dest-dir out --printing 0 --process-type3 1 --no-drm 1 out.pdf

Preprocessing: 521/521
IO Error.199/521
Working: 521/521
Error: Cannot open the manifest file

Using no command line options gave exactly the same error. The final html file is empty.

Optimising the original file with Ghostscript a 2nd time gave an optimised file which failed exactly as above.

So..., __Has anyone built this for Windows 64?__, or would you advise I build it on Linux?  I'd like to fix this error, and, additionally, add some more optimizations to pdf2htmlEX

I notice the Windows build instructions are only in Chinese!

Mark Pawelek

unread,
Mar 1, 2019, 6:08:00 AM3/1/19
to pdf2htmlEX
Forgot to mention. The GhostScript optimized file reads OK in all PDF browsers I tried and page 199 looks perfectly OK to me.

Mark Pawelek

unread,
Mar 1, 2019, 7:19:49 AM3/1/19
to pdf2htmlEX
I upgraded to the latest version of GhostScript. Opened the command line as Administrator. Re-optimised the original PDF. Now there is not IO Error.

Finally got it to work by executing pdf2htmlEX from the folder it was installed in.  The bug happens on Windows when pdf2htmlEX cannot find its data folder. You can get around having to execute it from the folder its installed in by including command line parameters for  --data-dir  (the value should be the path to its data folder (which is a subfolder in the pdf2htmlEX installation).

This issue is, sort of, fixed, in that there is a work around.  Ideally pdf2htmlEX should give a diagnostic error when it cannot find its data folder.



On Friday, March 1, 2019 at 11:05:04 AM UTC, Mark Pawelek wrote:
Reply all
Reply to author
Forward
0 new messages