Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handbook PDF Generation wkhtmltopdf ProtocolUnknownError #1200

Closed
crumgary opened this issue Jul 30, 2020 · 0 comments · Fixed by #1201
Closed

Handbook PDF Generation wkhtmltopdf ProtocolUnknownError #1200

crumgary opened this issue Jul 30, 2020 · 0 comments · Fixed by #1201
Labels
Milestone

Comments

@crumgary
Copy link

crumgary commented Jul 30, 2020

Describe the bug
When generating the PDF handbook wkhtmltopdf issues a ProtocolUnknownError message.

This seems to be a known issue. Under Linux the Handbook tool recommends using an obsolete version of wkhtmltopdf. Windows does not have that message (that I saw).

Environment (please complete the following information):

  • OS: Windows 10
  • COSMOS Version 4.4.2

Possible Solution

I found this issue on the wkhtmltopdf github site: wkhtmltopdf/wkhtmltopdf#2660

The solutions was to add the option --enable-local-file-access

Here is where it would go:

system_call = "wkhtmltopdf -L #{@pdf_side_margin} -R #{@pdf_side_margin} -T #{@pdf_top_margin} -B #{@pdf_bottom_margin} -s Letter #{header} #{footer} #{cover} #{@pdf_toc} \"#{tmp_html_file.path}\" \"#{File.dirname(filename)}/#{File.basename(filename, '.*')}.pdf\""

I tested this in a Windows 10 environment and it seems to work. I can create a pull request.

@ghost ghost closed this as completed Jul 30, 2020
@ghost ghost added the bug label Aug 18, 2020
@ghost ghost linked a pull request Aug 18, 2020 that will close this issue
@ghost ghost added this to the v4.5.0 milestone Nov 6, 2020
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant