Hello,
I'm trying to use the Java wrapper to Prince.
Since we don't want to pollute the filesystem, I'm using the convert(InputStream, OutputStream) method of class Prince together with setBaseURL(String) method. This makes me guess that Prince is able to load resources like images referenced in the HTML by using HTTP requests. But then, why not load the HTML itself with a HTTP request, something like
p = new Prince(exePath);
p.setBaseURL(baseURL);
ok = p.convert(htmlURL, outputStream);
Said another way, I don't understand the unsymmetrical treatment of the HTML and its related resources like CSSs, images, etc. The HTML needs to be specified either as a path on the filesystem or as InputStream while the resources can be left specified as URLs inside the HTML.
Am I missing some important point?
I'm trying to use the Java wrapper to Prince.
Since we don't want to pollute the filesystem, I'm using the convert(InputStream, OutputStream) method of class Prince together with setBaseURL(String) method. This makes me guess that Prince is able to load resources like images referenced in the HTML by using HTTP requests. But then, why not load the HTML itself with a HTTP request, something like
p = new Prince(exePath);
p.setBaseURL(baseURL);
ok = p.convert(htmlURL, outputStream);
Said another way, I don't understand the unsymmetrical treatment of the HTML and its related resources like CSSs, images, etc. The HTML needs to be specified either as a path on the filesystem or as InputStream while the resources can be left specified as URLs inside the HTML.
Am I missing some important point?