Forum Replies Created

Viewing 15 posts - 1,891 through 1,905 (of 4,249 total)
  • Author
    Posts
  • in reply to: Question about header areaHeight
    #29002

    It works.
    Thanks for quick replay.

    Kind regards,
    Gabriel

    in reply to: NullPointerException sometimes during render
    #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
    #28992

    The 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?
    #28955

    Sorry 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?
    #28956

    Does your product or Tomcat installation includes GWT-DEV.jar?

    in reply to: Anybody had problems with PD4ML on Lion for Mac?
    #28957

    No, we don’t use GWT, and the .jar you mention is not among our libraries.

    in reply to: HTML/CSS rendering issues
    #26727

    Hi

    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.

    BAC
      in reply to: Large PDF Issue
      #28858

      We’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.80fx3

      After 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
      #28859

      A 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
      #29003

      Try to enable debug info and inspect the output: it should report which TTF files it tries to load and fails.

      in reply to: Troubleshooting
      #26728

      With 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?
      #28958

      Since 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?
      #28959

      Thank 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?
      #28960

      Is the trace any use to you?

      in reply to: Anybody had problems with PD4ML on Lion for Mac?
      #28961

      P.S. our OSX is a bit more advanced than yours.

      We have OSX 10.7.4

    Viewing 15 posts - 1,891 through 1,905 (of 4,249 total)