Forum Replies Created

Viewing 15 posts - 2,086 through 2,100 (of 4,333 total)
  • Author
    Posts
  • in reply to: Header problem using mixed Portrait and Landscape
    #29107

    We publish a version, which fixes the issue, later today or tomorrow.

    in reply to: Convert ASP.Net page with Java Applet forms authentication
    #29113

    You need to determine how the ASP.Net application propagates session ID. It could be a session ID embedded to URL or (most probably) a cookie.

    Cookie can be added to HTTP request this way:

    pd4ml.setCookie( "JSESSIONID", cookieValue );
    where cookieValue is something like that: “9034657927465;path=/”

    JSESSIONID keyword is specific for Java, .Net uses anything else.

    in reply to: General questions / FAQ
    #26778

    Hi,
    I’m new to PD4ML and I need your help with a little issue.
    Is there a way in PD4ML to set the pdf page margins? I can’t find it.
    I use the following HTML:

    <!doctype html>
    <html lang="en">
    <head>
    <meta charset="UTF-8">
    <title>Export</title>
    <style>
    body {margin:0;padding:0;}
    </style>
    </head>
    <body>
    <table width="8.125in" cellpadding="0" cellspacing="0" border="0" align="center">
    <tr><td>test</td></tr>
    </table>
    </body>
    </html>

    Thanks in advance!

    in reply to: Pd4ml – Page Margins
    in reply to: SVG or embedded pdf Images
    #27432

    Have there been any updates/changes with regard to this? I’m considering using a charting library that generates SVG charts. I could use Batik to convert those to JPEG/PNG, but it would be great if I could instead embed the SVG in the PDF.

    Thanks,
    Matt

    in reply to: Troubleshooting
    #26779

    When an certain snippet of HTML exists in a document, it will make the renderer enter some kind of death spiral where it will fill up the heap until the machine stops responding.

    The snippet seems to be

    <SPAN style="white-space:pre" class="Apple-tab-span"> </SPAN>

    In context of a very simple example:

    <table>
    <tr>
    <td>
    TEXT
    <!--<SPAN style="white-space:pre" class="Apple-tab-span"> </SPAN>-->
    MORE TEXT
    <SPAN style="white-space:pre" class="Apple-tab-span">   </SPAN>
    FINAL TEXT
    </td>
    </tr>
    </table>

    Here’s a histogram of my heap after trying to render this HTML:

    num     #instances         #bytes  class name
    <hr class="bbcode_rule" />
    1:      12253005      784192320  org.zefer.html.doc.view.b
    2:           517       55412344  [Ljava.lang.Object;
    3:         26309        3785624  <constMethodKlass>
    4:         26309        3590760  <methodKlass>
    5:          2671        2474760  [B
    6:          1786        2400848  <constantPoolKlass>
    7:          1786        1494536  <instanceKlassKlass>
    8:          1504        1396576  <constantPoolCacheKlass>
    9:         18028        1279584  [C
    10:          8536         603344  [I
    11:         18388         588416  java.lang.String
    12:         12400         396800  java.util.HashMap$Entry
    13:           457         321504  <methodDataKlass>
    14:          1966         242192  java.lang.Class
    15:          2781         204224  [S
    16:          2765         173064  [[I
    17:          6991         111856  java.lang.Integer
    18:           304         108560  [Ljava.util.HashMap$Entry;
    19:           163          95192  <objArrayKlassKlass>
    20:          1761          56352  java.util.concurrent.ConcurrentHashMap$HashEntry

    And the following is a very short Java program to demonstrate the issue:

    String html = "<table><tr><td>TEXT<SPAN style="white-space:pre" class="Apple-tab-span"> </SPAN>MORE TEXT<SPAN style="white-space:pre" class="Apple-tab-span">   </SPAN>FINAL TEXT</td></tr></table>";
    StringReader sr = new StringReader(html);
    OutputStream os = new ByteArrayOutputStream();
    
    PD4ML pd4ml = new PD4ML();
    pd4ml.enableDebugInfo();
    pd4ml.useTTF( "java:", true );
    pd4ml.setHtmlWidth(1050);
    pd4ml.enableSmartTableBreaks(true);
    
    try {
    pd4ml.render(sr, os);
    } catch (Exception e) { }
    
    sop(((ByteArrayOutputStream)os).toByteArray());

    in reply to: General questions / FAQ
    #26780

    My colleague wrote two JAVA programs, one is JAVA agent in Lotus Notes that will convert email into HTML. Another one is a web service, which will receive the HTML and convert it into PDF by pd4ml.
    When the email got a attachment which filename is non-English (In my test case, it is Traditional Chinese characters.), the PDF converted from it cannot show the correct filename of the attachment while the filenames as a text in the content of the email can be showed correctly.

    I have checked that the “description” of the attachment still got the correct filename and the HTML header had already specified the encoding in UTF-8. Also, the JAVA program for changing the HTML to PDF has set the TTF and the property file had been created for the fonts.

    I have also tried the latest version PD4ML Java v3.8.0fx7.

    What should I do?
    Thank you very much.

    in reply to: Render crashes and heap space fills
    #29116

    We reproduced the problem and work on it.

    in reply to: watermark in JSP
    #29097

    Did you try to add debug=”true” attribute to (I suppose you use PD4ML JSP taglib) and inspect the server log? Are there any traces it tries to load the image and fails?

    in reply to: Troubleshooting
    #26781

    I am using PD4ML 380fx6 taglibs which generates a PDF. This works fine in Chrome, Firefox and IE9 +.

    But when I do it in IE8 I get the attached error.

    This is the transform tag I am using

    <pd4ml:transform
    screenWidth="1100"
    pageFormat="A4"
    pageOrientation="portrait"
    pageInsets="15,15,15,15,points"
    inline="false"
    generateHyperlinks="false"
    debug="true"
    outline="headings"
    fileName="Report.pdf">
    <%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>

    Http Response headers

    Cache-Control:private
    Cache-Control:no-cache
    Connection:close
    Content-disposition:attachment; filename=Report.pdf
    Content-Length:10646
    Content-Type:application/pdf
    Date:Wed, 19 Sep 2012 16:07:16 GMT
    Expires:0
    Pragma:no-cache
    Pragma:cache
    Server:Apache-Coyote/1.1

    Anyone have any ideas?

    in reply to: IE8 PDF wont download
    #29123

    I think this may be related to it.

    http://blogs.msdn.com/b/ieinternals/archive/2009/10/02/internet-explorer-cannot-download-over-https-when-no-cache.aspx

    Any idea how to fix this using the PD4ML TagLib?

    in reply to: Junk filenames of the attachments in PDF
    #29118

    Here are more details of the problem.

    The original filenames of the attachments in the email:

    The filenames of the attachments in the rendered PDF, please note that the filenames in the content are correct:

    Thanks.

    in reply to: HTML/CSS rendering issues
    #26782

    In the latest version (3.80fx7), when using background-color: transparent the rendering can be incorrect.

    For the sample HTML given:

    <table style='background-color: white; color: black; border: 2px solid red;'>
    <tr>
    <td style='background-color: transparent'>TEXT MORE TEXT FINAL TEXT</td>
    </tr>
    <tr>
    <td>2 TEXT MORE TEXT FINAL TEXT</td>
    </tr>
    <tr>
    <td style='background-color: transparent; color: yellow'>TEXT MORE TEXT FINAL TEXT</td>
    </tr>
    </table>

    I would expect a table with a 2 pixel border, white background and black text. It should have three rows, each with a white background, and the first two rows black text while the third has yellow text. Instead, what I get is the rows that have background-color: transparent are getting BLACK background – I’m guessing it has something to do with how the tables are rendered using layering in the Java graphics package.

    in reply to: Junk filenames of the attachments in PDF
    #29119

    It looks like the file names are UTF-8-encoded, but treated as Latin by PD4ML.

    Please make sure you use the most recent dxl4pd4ml.xsl and pd4ml(_demo).jar. The actual stylesheet can be obtained from https://pd4ml.com/command-line-dxl-to-pdf-converter.htm

    Also it is a good idea to dump the document source as DXL and to try to convert it offline with the command line tool. It simplifies debug a lot. -dumphtml switch should help you to analyse if the names in HTML are correct, before the doc passed to PDF converter.

    in reply to: IE8 PDF wont download
    #29124

    It looks like the problem is caused by a caching of documents, downloaded by HTTPS. Please correct if I am wrong.
    It was a known issue of older PD4ML JSP taglib versions, until we found a safe HTTP header directives set.

    Currently PD4ML taglib sets only the following HTTP cache control directives:

    ((HttpServletResponse) sr).setHeader("Pragma", "cache");
    ((HttpServletResponse) sr).setHeader("Expires", "0");
    ((HttpServletResponse) sr).setHeader("Cache-control", "private");

    In your case there are some other cache controls (including conflicting with the above) – probably the hosting application is configured to add them to each reply. Try to switch it off for PDF generating JSPs.

Viewing 15 posts - 2,086 through 2,100 (of 4,333 total)