PDF Generating Tool Support Forum

HOME   Login   Register    Search




  Subject: Images not working
   PostPosted: 20 Aug 2009, 21:19 
I have 3 environmnets, set up identically on 1 sun unix server running websphere6.1.

I am using Pd4ml version 322

2 of the 3 identical environments work. I am trying to figure out why the 3rd env is not working. (code is exactly the same)

NON WORKING ENVIRONMENT:
resource https://ebessdev2.web.com:443/images/logo90wb_black.gif not found.

/images is a directory within my war. I have copied that .gif to different areas and they are not being rendered in the pdf no matter where i place them.

This article i "thought" would solve the issue, howeveer the version of pd4hm i am ussing does not offer the org.zefer.cache.ResourceProvider;
pd4ml-html-css-pdf-tips-tricks-f7/a-definition-of-custom-resource-loaders-t40.html



I have tried refrencing these in the html and NON work.

<img src='images/logo90wb_black.gif'>
<img src='/images/logo90wb_black.gif'>
<img src='https://ebessdev2.web.com:443/images/logo90wb_black.gif'>
<img src='http://ebessdev2.web..com/images/logo90wb_black.gif'>
<img src='logo90wb_black.gif'>
<img src='/logo90wb_black.gif'>

The HTML is stored in a database.

The base(url) is https://ebessdev2.web.com:443, protocol https, port 443.


Again, identical code on the same server work in 2 of 3 instances.


Thank you for your advice!!


  Subject: Re: Images not working
   PostPosted: 21 Aug 2009, 19:15 
> I have 3 environmnets, set up identically on 1 sun unix server running websphere6.1.

Websphere implements SSL a proprietary way (the classes are not derived from the standard Java's SSL classes), thus as a rule an attempt to load HTTPS resource from PD4ML in such environment causes ClassCastException. So I wonder how it works on the 2 servers.

If the images are stored on the same server, where PD4ML runs, it makes sense to avoid any network interactions by the image loading. The best way would be to trigger useServletContext() method of PD4ML and to use absolute web paths (<img src='/images/logo90wb_black.gif'>) in the source HTML documents.

Base URL definition most probably needs to be suppressed there.


  Subject: Re: Images not working
   PostPosted: 04 Aug 2011, 17:47 
would you make a more descriptive example, i try to find a solution but i didnt. If you publish an example with code on Java. Thanks

PD4ML wrote:
> I have 3 environmnets, set up identically on 1 sun unix server running websphere6.1.

Websphere implements SSL a proprietary way (the classes are not derived from the standard Java's SSL classes), thus as a rule an attempt to load HTTPS resource from PD4ML in such environment causes ClassCastException. So I wonder how it works on the 2 servers.

If the images are stored on the same server, where PD4ML runs, it makes sense to avoid any network interactions by the image loading. The best way would be to trigger useServletContext() method of PD4ML and to use absolute web paths (<img src='/images/logo90wb_black.gif'>) in the source HTML documents.

Base URL definition most probably needs to be suppressed there.


  Subject: Re: Images not working
   PostPosted: 06 Aug 2011, 20:03 
If you use PD4ML in a servlet context, you obviously use PD4ML API and call one of the pd4ml.render() methods.

Before the method call, try to add

pd4ml.useServletContext( ctx );

call. Does not help? Replace it with

pd4ml.useHttpRequest(httpRequest, httpResponse);



[Reply]     [ 4 posts ] 

Copyright ©2004-10 zefer|org. All rights reserved. Bookmark and Share