1055
Views
19
Comments
[Html2PdfConverter] Issue in generating PDF via HtmlToPdfConverter
Question
html2pdfconverter
Web icon
Forge asset by Guilherme Pereira

Hello All,

I'm have an problem generating pdf using the component html2pdfconverter in the production environment. This is the URL that I tried and  it throws the below error while generating the pdf.
https://docs.oracle.com/cd/E52734_01/oim/OIGSS/api-users.html

/tmp/TEMPGNNLUURHWK9805bcd3e41f411cbe1a9a74b1bb5a3e.pdf (No such file or directory) Error: Failed loading page https://docs.oracle.com/cd/E52734_01/oim/OIGSS/api-users.html (sometimes it will work just to ignore this error with --load-error-handling ignore) Exit with code 1 due to network error: UnknownNetworkError


But I'm able to generate PDF for the same URL on the development environment which is same version as Production .In fact  we have got two Front End servers for production .I have alo attcahed the screenshot of the error.

Please let me know if you need logs and traces to be analyzed.

Regards,
Aravindkumar A


error.jpeg
UserImage.jpg
Aravindkumar Annamalai

Hello Miguel,

I'm very glad that you have replied promptly.

Regarding the issue, I have tried the same https URL on development and it is working perfectly and fast too.



Regards,
Aravindkumar A

2020-02-28 09-46-54
Eduardo Jauch

Hello Aravindkumar,

Did you tested the PDF generation from the admin page of the HTMLtoPDF?
Also, the executables uploaded to the production environment are the same as the ones uploaded to the Dev environment?

Cheers.

UserImage.jpg
Aravindkumar Annamalai

Hello Eduardo,
What do you mean by test from the administration page.I'm sorry I don't understand the question.

From the administration page, I can see  upload binaries for PDF Generator and Image Generator.In addition to that I can see upload tab for Additional Binaries , log for debug messages and binaries directory .

Regarding the executables, I uploaded the same executables as in the development.


Regards,
Aravindkumar A

2020-02-28 09-46-54
Eduardo Jauch

Hello Aravindkumar.

From the Administration app of Html2Pdf, you can test it.

So, you can check if it is a problem with your application (related to the Server), or with the HTMLToPDF converter installation.

UserImage.jpg
Aravindkumar Annamalai

Hello Eduardo,

This is the place where I tired to convert the PDF. I have already attached the screenshot of the error which depicts the same .

Can you please check the attachment.


Regards,
Aravindkumar A

UserImage.jpg
Aravindkumar Annamalai

Hello,
This attachment is from the development and it went through successfully.

2020-02-28 09-46-54
Eduardo Jauch

Hello Aravindkumar.

So, it is a Server configuration problem.

First, you need to properly configure it, like this:

If your production server is a FARM, you may need to mark it.
You can also select LOG DEBUG messages so that you can try to better understand the problem looking to the logs in the Service Center.

Also, be sure that the executable and DLLs you uploaded are the correct ones for your environment. There are a set of files that need the c++ redistributable library to be already installed in the server. If it is not installed, you are not able to execute the app.

Other than that, you may need to check if in the production server the IIS user and so on has access to the tmp folder, etc.

You can also try other addresses (with and without HTTPS) to see if it makes any difference.

Remember, Production and Development can have different configurations that may need to be looked upon.

UserImage.jpg
Aravindkumar Annamalai

Hello Eduardo,

If it is server configuration problem , it should not work at all.But in my case, it works for some URLs and does not some big URLs .I'm able to convert this URLs on production environment.
https://dcsmart.dc.gov.ae/HtmlToPdfConverter/HowToPDF.jsf

 Attached here the screenshot .

 And I have noticed that you have mentioned "if production server is a FARM, you may need to mark it".

In my case, it is FARM  environment but I didn't any FARM check box on the application page.Can we configure it directly on production without publishing  from QA to production.

I remember that this application was published/deployed through dev -> qa -> prod.


Regards,
Aravindkumar A


2020-02-28 09-46-54
Eduardo Jauch

Hi Aravindkumar,

An app that sometimes work and sometimes not, that we know (or assume so) that works, it is a configuration problem.

The fact that it works for some URLs but not for others is, at least, strange.

But if your production environment is a FARM, you need to mark it in the administration page of the application, in the environment where it is a FARM (production, in this case). No need to change in QA if it is not a FARM (no need to publish as well).

This may be the reason to this weird behaviour, as I can't see any reason for one URL to work, but the other not (if they are completely random URLs in the NET).

UserImage.jpg
Aravindkumar Annamalai

Hello Eduardo,

I understand your concern.I cannot see the FARM check box on the administration page of the application.Here is the attachment of the  administration page.I would really appreciate you if you can help me to fix this issue.

Regards,

Aravindkumar A

2020-02-28 09-46-54
Eduardo Jauch

Hi, It seems you have a newer version of HTMLtoPDF than mine...

2020-02-28 09-46-54
Eduardo Jauch

Could you do a test that fails and than put here the log messages related? (both error and others in monitoring)

UserImage.jpg
Aravindkumar Annamalai

Hello Eduardo,
Please find attached the screenshots for both error and successful.

ERROR


SUCCESSFUL


Regards,

Aravindkumar A

2020-02-28 09-46-54
Eduardo Jauch

Hello Aravindkummar,

By the errors, that are Timeouts it seems, and by the fact that you said in the same server, other pages the PDF is correctly created, I would investigate the server, to see if it is somehow preventing the executable of hitting certain pages.

Is this a cloud environment or an onpremises environment?

UserImage.jpg
Aravindkumar Annamalai

Hello Eduardo,
This is an on-premise environment.


Regards,
Aravindkumar A 

UserImage.jpg
RameshKumar Kumar

Hello Eduardo,

Is there any update on my issue.

Regards,

Aravindkumar A

2020-02-28 09-46-54
Eduardo Jauch

Hi RameshKumar,

Unfortunatelly, I can't help, as it seems to be a problem in your server, not in HTML2PDF.

The fact that in Prooduction it works on some pages (https) and not on others (also https), and that in DEV it works on all of them, lead me think that is your server (production) that is somehow blocking some of the pages. You need to go loook into windows logs and so on, to see if there is anything that can help you understand the problem. Could be a firewall thing, a proxy thing, etc.

I am really out of ideas.

Cheers.

UserImage.jpg
Aravindkumar Annamalai

Hello Eduardo,

Could you please come on webex to check the issue.

In fact ,I have reinstalled the binaries on the different location ,but it still gives the same error.I have even tried for image conversion and it throws this error.

tmp/TEMPHRYVTRQUAMd0241150129b47a3be6de7e4088bec98.png (No such file or directory)
Loading page (1/2)
[>                                                           ] 0%
[======>                                                     ] 10%
Error: Failed loading page https://docs.oracle.com/cd/E16764_01/oid.1111/e10029/concepts.htm#i1031358 (sometimes it will work just to ignore this error with --load-error-handling ignore)
Exit with code 1 due to network error: UnknownNetworkError



Regards,

Aravindkumar A

2021-07-22 16-16-55
Edgar Ramos
Champion

Hello Aravindkumar Annamalai,

I was having the same problem in DEV + STG (on-premisses) after digging and digging I've done the following, in DEV I went to C:\Windows\System32\drivers\etc\hosts and then I open the file (with Admin permissions) and then added the following code:

"<your local ip> <your app url>"

Like this:

Repeat the same process to STG. 

Note: Special thanks to my friend Carlos Freitas for the guidance on this one!


I hope this helps you...

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.