I am using prince 6.0 rev 5 and using java input output streams to generate pdf. The generated pdf does not include images if my java application runs under a http-proxy. To overcome this issue I modified Prince.java as below, to indicate the proxy for prince.exe. After that pdf is being generated with images, but now the css, depicted in html, is not being applied.
Do you have an idea to use http-proxy without any malfunctionality?
Application Code
Prince.java
Generated commandline
[C:\Program Files\Prince\Engine\bin\Prince.exe, --input=html, --baseurl=http://localhost/pdf/PMW-EX1.html, --http-proxy=someIP:8080, --server, --silent, -]
Do you have an idea to use http-proxy without any malfunctionality?
Application Code
is = url.openStream();
fos = new FileOutputStream( pdfFilePath );
prince.setBaseURL(url.toString());
success = prince.convert(is, fos);
Prince.java
public class Prince{
//Proxy settings
private String mHttpProxyHost;
private String mHttpProxyPort;
...
private List getCommandLine(){
....
cmdline.add("--http-proxy="+mHttpProxyHost+":"+mHttpProxyPort);
...
}
}
Generated commandline
[C:\Program Files\Prince\Engine\bin\Prince.exe, --input=html, --baseurl=http://localhost/pdf/PMW-EX1.html, --http-proxy=someIP:8080, --server, --silent, -]