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

Network error while generating pdf in windows. #165

Closed
zealfire opened this issue Jun 29, 2015 · 6 comments
Closed

Network error while generating pdf in windows. #165

zealfire opened this issue Jun 29, 2015 · 6 comments

Comments

@zealfire
Copy link

Hi thanks for the great wrapper. I am facing a problem while generating pdf in windows. The pdf is generated as expected but a run time exception is always thrown. The exception is as follows:

RuntimeException: The exit status code '1' says something went wrong: stderr: "Loading pages (1/6) [> ] 0% [======> ] 10% [===========> ] 19% [============> ] 20% [================> ] 27% [==================> ] 30% [============================================================] 100% Counting pages (2/6) [============================================================] Object 1 of 1 Resolving links (4/6) [============================================================] Object 1 of 1 Loading headers and footers (5/6) Printing pages (6/6) [> ] Preparing [============================================================] Page 1 of 1 Done Exit with code 1 due to network error: ContentOperationNotPermittedError " stdout: "" command: C://xampp/htdocs/modules/pdf/wkhtmltopdf/bin/wkhtmltopdf.exe --lowquality "C:\Users\sony\AppData\Local\Temp\knp_snappy5590f02e7424a4.53154017.html" "queue.pdf". in Knp\Snappy\AbstractGenerator->checkProcessStatus()

Can you help me to get rid of this problem? Thanks.

@jeremyb
Copy link
Contributor

jeremyb commented Jun 30, 2015

Hi,

Your ContentOperationNotPermittedError error seems to be related to wkhtmltopdf, After some researches, I think it can be related to:

I hope it could help...
If not, can you provide more details about what options you're using and perhaps the C:\Users\sony\AppData\Local\Temp\knp_snappy5590f02e7424a4.53154017.html content.

@zealfire
Copy link
Author

zealfire commented Jul 8, 2015

Hi,
Thanks for looking into the problem. On further investigation I came to conclusion that inclusion of base tag in head section was cause of problem. I was writing a code like this:

<base href=" \path\to\file" \>
which was causing Exit with code 1 due to network error: ContentOperationNotPermittedError but after removing it the error was removed. Any reasons for this?

Since I think this is something caused by wkhtmltopdf so I have made an issue regarding the same over here: wkhtmltopdf/wkhtmltopdf#2448

@akovalyov
Copy link
Contributor

@zealfire do you have any update on it?
can I close it as not related to Snapy itself?

@akovalyov
Copy link
Contributor

btw, have you tried --load-error-handling ignore?

@akovalyov
Copy link
Contributor

@zealfire any news on it?

@zealfire
Copy link
Author

@akovalyov sorry for replying so late. I think that this problem is not because of snappy hence earlier I made an issue regarding this in the wkhtmltopdf repo. But since then I have heard from them. Also recently I changed my HTML content after which I am not getting any error hence I didn't paid attention to this issue in the past few days. Any ways since this problem is not related to this library I am closing this issue. Thanks for showing patience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants