Why does HTML2PDF on Mac OS X give "Conversion failed. HTTP Code: 0" errors?


I downloaded HTML2PDF for Mac OS X, unzipped it and placed it in the Samples/Lib directory as specified. But when I run the sample, I get the error “Conversion failed. HTTP Code: 0”. What’s going wrong?


You need to set executable permissions on html2pdf.dylib; e.g.:

chmod a+x html2pdf.dylib

The file is packaged with executable permissions in the HTML2PDFMac.zip, but OS X may automatically remove executable permissions from dylib files when unzipped.

I am also getting “Conversion failed. HTTP Code: 0”, and the module is definitely executable.

Using @pdftron/pdfnet-node@9.4.2, and the latest available HTML2PDF on Mac M1.

Could you try the following on your Mac https://support.apple.com/en-ca/guide/mac-help/mh40616/mac

I believe the application is being blocked from running and it should work once it’s granted permission.

Let me know if that fixes your issue.

I created a new topic, HTML2PDF Conversion failed - #6 by ladd.hoffman