[Html2PdfConverter] Issue in generating PDF via HtmlToPdfConverter

[Html2PdfConverter] Issue in generating PDF via HtmlToPdfConverter

  
Forge Component
(52)
Published on 30 Oct by Guilherme Pereira
52 votes
Published on 30 Oct 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

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

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.

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

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.

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

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

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.

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


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).

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

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

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

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

ERROR


SUCCESSFUL


Regards,

Aravindkumar A

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?

Hello Eduardo,
This is an on-premise environment.


Regards,
Aravindkumar A 

Hello Eduardo,

Is there any update on my issue.

Regards,

Aravindkumar A

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.

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