Image does not appear when rendering html as PDF (Doc.Templa

Posted by smartsysISV on 20-Apr-2017 17:02

When I'm using a html-template with a logo (image) this is ok as html.

When i set "Render as PDF" the image not appear in the document.

Private cloud.

ex:

<html>
<img align="left" border="0" height="30" src="{!#SETTINGS.invoicelogo#url}" width="148" />
</html>

Any idea?

Posted by murali on 25-Apr-2017 15:22

Looks like internally from inside prod servers, the  www.smartlogin.no:8830 is not reachable. Please check your internal connectivity ( do a curl   www.smartlogin.no:8830/some-path  from within prod/master/other  servers to verify)

All Replies

Posted by Rajkumar Mateti on 21-Apr-2017 00:32

Hi smartsysISV,

I can see logo coming correctly when HTML template with Rendered as PDF in 4.5 version.

Which version of Rollbase you are using?

Thanks,

Rajkumar

Posted by Karthikeyan Bhaskaran on 21-Apr-2017 01:37

Hello Stein,

I could not replicate this either - tried it in both 4.4.4 and 4.5.
Can you try with a simple test case - if reproducible, then please share the app [and the details of the logo image field in the Settings object] ?

Thank you,
Karthikeyan

Posted by smartsysISV on 21-Apr-2017 02:00

Yes, the same template is fine in both 4.4 and 4.5 in the public cloud.

You can use a template like the one i show in the initially case-description.

In html everything is fine, when render as pdf the image disappear.

It has to be something with the pd4ml-congfig in my private cloud, but I can't see any options.

Posted by Santosh Patel on 21-Apr-2017 06:26

Follow these steps to enable PD4ML config in your private cloud:

- Log in to master/root tenant

- navigate to /master/system/liveProps.jsp

- Add an entry with these values

Key: enablePD4MLDebug

Value: true

- Now perform the PDF generation and you should see some PD4ML logging in tomcat logs (<tomcat>/logs/catalina.out or catalina.<todays_date>)

If the image token was correctly resolved you will see PD4ML making a request to fetch the image using the URL. Verify that url to ensure that the image is reachable from the server.

NOTE: Remember to turn off this setting later, if you are in production.

Posted by smartsysISV on 21-Apr-2017 11:34

Here is errormessages in log:

version: PD4ML 3100 Pro DMS

cache disabled.

(re-)reading www.smartlogin.no:8830/.../Image

loading www.smartlogin.no:8830/.../Image [1003ms]

Connection refused: connect: www.smartlogin.no:8830/.../Image (socket timeout 0ms)

image www.smartlogin.no:8830/.../Image has zero length.

can not load image: www.smartlogin.no:8830/.../Image

done in 1059ms.

I can see errormessage "Connection refused" and socket timeout?

But if I try to open this address form a web-browser the logo is loading ok.

If i try to show this template as html (and not render as pdf) it also works fine.

Posted by Anvi Jain on 24-Apr-2017 01:01

Hi Stein,

Make sure the server (not a client browser) can resolve smartlogin.no DNS name and has a routing to it. Log into the server and try to load any smartlogin.no URL with wget,curl or anything similar.

Thanks,

Anvi

Posted by murali on 25-Apr-2017 15:22

Looks like internally from inside prod servers, the  www.smartlogin.no:8830 is not reachable. Please check your internal connectivity ( do a curl   www.smartlogin.no:8830/some-path  from within prod/master/other  servers to verify)

Posted by mzhalbyrov on 04-May-2017 06:49

I had the same issue.

Problem in internal connectivity.

Posted by smartsysISV on 05-May-2017 11:49

How do you fix this?

Posted by Ramana Kaza on 19-May-2017 04:27

Your network guys should be able to resolve this.

This thread is closed