HTML to PDF / DOCX / RTF Java converter library › Forums › PD4ML v3 Archived Forums (Read Only) › General questions / FAQ › Images not working
- This topic has 7 replies, 4 voices, and was last updated Dec 23, 2015
15:31:25 by Anonymous.
-
AuthorPosts
-
August 20, 2009 at 19:19#26245
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.htmlI have tried refrencing these in the html and NON work.
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!!
August 21, 2009 at 17:15#27447> 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 () in the source HTML documents.
Base URL definition most probably needs to be suppressed there.
August 4, 2011 at 15:47#27448would 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 () in the source HTML documents.
Base URL definition most probably needs to be suppressed there.
August 6, 2011 at 18:03#27449If 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);
March 6, 2013 at 13:36#27450Hi,
I have added pd4ml.useServletContext( ctx );or
pd4ml.useHttpRequest(httpRequest, httpResponse);
Till now also, images are not displaying in pdf file.
Please, it is very urgent.
Thanks inadvance.
-satyaprasad
March 6, 2013 at 15:29#27451what does it print to STDOUT/server’s log if you enable debug info?
March 7, 2013 at 13:28December 23, 2015 at 15:31 -
AuthorPosts
The forum ‘General questions / FAQ’ is closed to new topics and replies.