Converting html to pdf is throwing an exception

Q: We get the following error when converting html to pdf

Message: An error occurred while converting the file.
Detailed error:
Permission to access registry is required
Conditional expression: false
Filename : Convert.cpp
Function : trn::PDF::Convert::ToPdf
Linenumber : 1744

  • at pdftron.PDF.Convert.ToPdf(PDFDoc in_pdfdoc, String in_filename)


This error occurs, because our virtual printer is being used as part of the conversion process, and for this to work PDFNet needs read/write access to HKCU, (or HKCR).

Note that this is not the only way to convert HTML to PDF. If MS Word is installed that will be used instead of the virtual printer, or if our HTML2PDF module is made available to PDFNet (see

It is suprising that your client cannot read/write to HKCU, that is typically allowed, so if they can fix that everything should work.

Otherwise, and assuming MS Word is not installed, then packaging HTML2PDF module should solve the issue. The HTML2PDF module is available here, and our SDK includes a HTML2PDF sample.

Please let me know if this works for you, and if you have any further questions.