Forum Replies Created
-
AuthorPosts
-
in reply to: Question about header areaHeight May 16, 2012 at 00:28in reply to: NullPointerException sometimes during render May 16, 2012 at 14:33#28991
I still have not solved this issue. Is there any way I can determine what is causing this exception?
in reply to: NullPointerException sometimes during render May 16, 2012 at 19:38#28992The exception is thrown in the following code (in StringTokenizer constructor)
[language=java:24yvxgeh]for (int i = 1; (headerName = conn.getHeaderFieldKey(i)) != null; i++) {
if (headerName.equalsIgnoreCase(SET_COOKIE)) {
Map cookie = new HashMap();
StringTokenizer st = new StringTokenizer(conn.getHeaderField(i), COOKIE_VALUE_DELIMITER);
…[/language:24yvxgeh]Where conn is URLConnection.
It seems, conn.getHeaderField(i) returns null, which should not be possible according to the method specification.We added an extra check for the null value to the development build. The fix will be available with the new beta release.
in reply to: Anybody had problems with PD4ML on Lion for Mac? May 21, 2012 at 14:16#28955Sorry for the delay, I hadn’t gone to sleep, I was on holiday.
Thanks for your continuing help.The following command produced a nice pdf:
java -Xmx512m -Djava.awt.headless=true -cp ./pd4ml.jar Pd4Cmd ‘http://pd4ml.com’ 1200 LETTER -bookmarks HEADINGS -pdfforms -debug -out /tmp/pd4ml.pdf
The only question is: why doesn’t it produce anything from Tomcat6 (which is also headless)? We get nothing from either API calls or tags
in reply to: Anybody had problems with PD4ML on Lion for Mac? May 21, 2012 at 18:08#28956Does your product or Tomcat installation includes GWT-DEV.jar?
in reply to: Anybody had problems with PD4ML on Lion for Mac? May 21, 2012 at 21:35#28957No, we don’t use GWT, and the .jar you mention is not among our libraries.
in reply to: HTML/CSS rendering issues May 23, 2012 at 06:40#26727Hi
I’m using the 380fx4 release of the pro version. I can get custom ttf fonts to display correctly in the document body but I’m unable to render them inside headers and footers. Is it possible to use custom ttf fonts in headers/footers? If not, is there a workaround? Will it be fixed in the near future?
Additional Info:
I’m setting the headers/footers in the HTML page using the pd4ml:page.header tags. I have tried having the font-family attribute as an inline style and in a class – neither work.
Also, I’m generating the PDF through the commandline using the Pd4Cmd class, and ‘importing’ fonts through the ‘-ttf’ option.
in reply to: Large PDF Issue May 23, 2012 at 15:07#28858We’ve been using the Java version of PD4ML for several years and it seems that we’re hitting a wall at somewhere over 1000pgs. For example, 500pg PDF might take about 9 minutes, which we find acceptable, however, a 1700pg PDF might take several hours. We’re trying to resolve this issue and any suggestions would be appreciated. Here are some statistics for this example:
1) We’re using JSP to produce HTML that is 16-17MB in size
2) There are only a few small images (~100k in size)
3) The resulting PDF is about 7.5MB
4) We’re calling PD4ML.render(java.net.URL url, java.io.OutputStream os)
5) PD4ML v3.80fx3After upgrading to v3.80fx3, we implemented the PD4ProgressListener to try to profile the process. The result is that it’s spending all that extra time in “step 92: layouting…”. We tried saving the HTML to a static file (i.e. Mozilla: SaveAs) then used PD4ML.render(java.io.InputStreamReader isr, java.io.OutputStream os, java.net.URL base) to create the PDF file and it seemed to create the PDF in about 9 minutes (acceptable). We also confirmed that it’s taking about 4 minutes to produce and stream the HTML from JSP. Do you have any idea why would it go from 9 minutes for the static HTML to several hours for the same HTML streamed (using a URL)?
in reply to: Large PDF Issue May 23, 2012 at 15:22#28859A usual reason of such problems is that the document layout is built as a single huge table. If it is your case, try to split it to smaller ones.
Also sometimes a borderless table with a single cell is used to limit horizontal width of content. If it is your case, replace it with a
in reply to: Custom fonts in header/footer May 23, 2012 at 15:24#29003Try to enable debug info and inspect the output: it should report which TTF files it tries to load and fails.
in reply to: Troubleshooting May 23, 2012 at 18:25#26728With TTF Embedding, I have managed to produce PDF document wtih Arabic font from default fonts.jar at http://pd4ml.com/i/easyfonts/fonts.jar
I am using Arial as my standard font however I found out that Extended Arabic characters like ڠ or ڠ did not render correctly in PDF.
For example the word:
دڠن
appears as individual char and not connected like the following:
دڠ ن
Please verify and hopefully shed some light as to why it behave in such manner.
in reply to: Anybody had problems with PD4ML on Lion for Mac? May 24, 2012 at 09:28#28958Since we get no log messages at all and no timeout, my colleague has run a dtruss (a sort of strace for mac) to see what system calls we can see.
It reads images but doesn’t then seem to do anything with them.
It appears to stop after looking for PD4CanvasHandler.class. This has something to do with Rhino as you can see from the following link, but this may not be significant, because presumably it should just look for the class and not worry if it doesn’t find it.html-pdf-faq-f1/html5-canvas-anyone-working-on-such-a-thing-for-pd4ml-t370.html
Perhaps we should send you a trace. If this might be useful can you tell us where to send it? We will try to make it as clean and concise as possible.
We also tried just increasing memory for Tomcat, but to no avail.
As I think I mentioned in another post, our production server, which runs on open BSD with the same maven configuration, has no problems, so it seems to be a system problem.in reply to: Anybody had problems with PD4ML on Lion for Mac? May 24, 2012 at 11:51#28959Thank you for the input!
So, most probably, it hangs in the following code:
[language=java:1376b11o]private boolean hasCanvasInterpreter() {
Class c;
try {
try {
c = Class.forName(PD4Constants.PD4ML_EXTERNAL_CANVAS_HANDLER);
} catch (ClassNotFoundException e) {
try {
c = Thread.currentThread().getContextClassLoader().loadClass(PD4Constants.PD4ML_EXTERNAL_CANVAS_HANDLER);
} catch (ClassNotFoundException e1) {
c = ResourceCache.class.getClassLoader().loadClass(PD4Constants.PD4ML_EXTERNAL_CANVAS_HANDLER);
}
}
} catch (Exception e) {
return false;
}if ( c != null ) {
return true;
}return false;
}[/language:1376b11o]I see nothing dangerous in it. It looks like it hits some class loader implementation specific issues.
in reply to: Anybody had problems with PD4ML on Lion for Mac? May 25, 2012 at 13:41#28960Is the trace any use to you?
in reply to: Anybody had problems with PD4ML on Lion for Mac? May 25, 2012 at 13:44 -
AuthorPosts