Forum Replies Created

Viewing 15 posts - 3,736 through 3,750 (of 4,234 total)
  • Author
    Posts
  • #33879

    Attached sample html file with css in it and pdf generated from this html using pd4ml library. can we use pd4ml version 4.0.8? is all this issues are resolved in it. currently we are using version 4.0.7

    Attachments:
    You must be logged in to view attached files.
    #33881

    we have tested our generate pdf in both versions 4.0.7 and 4.0.8. In 4.0.8 version we are facing lot of UI issues and some charts are not displayed in this version. Attaching sample html and pdf for both the versions. So, which version we should use ? we found that position : static property of css is not supporting in version 4.0.8. can you please confirm about this. because of this property it breaks pdf.

    in reply to: Technical questions / Troubleshooting
    #33883

    Hello PD4ML,

    In the pdf we generate we are using an different header & footer on the first page, and on the other pages is also an header & footer visible. This was something that couldn’t be set-up by using the scope option, so for pd4ml v3 I followed an tip to extend the PD4PageMark (https://pd4ml.com/support/html-pdf-faq-f1/pdf-page-headers-footers-definition-options-t41-20.html)
    and override the method getHtmlTemplate to return the correct html for that page.

    Now with the new v4.0.7 API I can no longer override the PD4PageMark. As an alternative I tried it with the scope, but I get to see the header twice, so that’s not an option (see Code).

    lPd4ml.setPageHeader( Html2, -1, "2+"); lPd4ml.setPageHeader( Html1, -1, "1");

    PS For people who are wanting to use the same trick, in pd4ml v3 the calculation for the dynamic height off the header is based on the first header. If your second header is larger is would be cutt off. To fix this in our case, I added some empty line in the first header to make sure the size is equal.

    in reply to: Using page specific headers/footers with the new API
    #33885

    In PD4ML v4 setPageHeader(html, …) method injects a portion of the HTML code, enclosed to , right after opening tag. The strange behavior (the header printed twice) can only be theoretically explained if the header HTML is not well-formed or misbalanced and somehow as result merges both definitions. However it is difficult to imagine how the code should look like to achieve the effect. Could you please publish what is in Html2 and Html1 variables?

    in reply to: Using page specific headers/footers with the new API
    #33886

    Hello PD4ML,

    I checked and the reason it doesn’t work with us, is due to our use of html/header/body tags in the header.
    If I remove those it is shown on the correct pages. I will check if this got any consequences in our resulting pdf.

    Html1 = “<html><body>

    Header for only the First page

    </body></html>”;
    Html2 = “<html><body>

    Header for all pages, except the first

    </body></html>”;

    PS: I made 3 topics Yesterday and this is the only one I can find. My other topics where in licenses that the link to de site license isn’t correct, and then in technical that the resourceprovider isn’t working with the old API.
    Do I have to recreate those or are they somewhere else ?

    in reply to: Using page specific headers/footers with the new API
    #33887

    I forgot to put the html in a code block:
    lHtml1 = "<html><body><div style=\"font-weight:bold\">Header for only the First page</div></body></html>"; lHtml2 = "<html><body><div style=\"font-weight:bold\">Header for all pages, except the first</div></body></html>";

    in reply to: Technical questions / Troubleshooting
    #33888

    Hello,

    We are migrating from PD4ML v3 to v4 and we discoverd some regressions when generating PDFs.

    One of those regressions is the style “border: none” which is not taking into account in some use cases (See the attached HTML file).

    I attached the generated PDFs for both versions 3.10 and 4.0.6 for example_with_border_none.html :
    • result_pd4ml_v3.pdf
    • result_pd4ml_v4_with_new_PD4ML_class.pdf
    • result_pd4ml_v4_with_old_PD4ML_class.pdf
    When we open example_with_border_none.html with Chrome browser, the displayed result is the correct one which is different from the PD4ML v4 result.

    Could you please provide us with the migration procedure from v3 to v4 if any? Or at least how to keep the same rendering as v3?

    Attachments:
    You must be logged in to view attached files.
    in reply to: PD4ML v3 to v4 migration: How to have the same rendering ?
    #33892

    Hi Cedric,

    first please give a try to the most recent snapshot of PD4ML v4.0.8 – it should fix the border issue. I’ve attached a doc, produced on my workstation with a dev build

    Attachments:
    You must be logged in to view attached files.
    in reply to: PD4ML v3 to v4 migration: How to have the same rendering ?
    #33894

    Hello,

    Thank you for your response.

    I just tested with the recent snapshot and I confirm that it fixes the border issue 🙂

    Now the generated PDF is different from yours:
    – I have 2 pages instead of 1
    – The table is truncated in my PDF
    – The size of my PDF is 10 Ko and yours is 103 Ko

    Attached my generated doc.

    I use the PD4ML class as follow:

    PD4ML pd4ml = new PD4ML(PD4ML_LICENCE);
    pd4ml.readHTML(new ByteArrayInputStream(html.getBytes()));
    File pdf = File.createTempFile("result", ".pdf");
    FileOutputStream fos = new FileOutputStream(pdf);
    pd4ml.writePDF(fos);
    Desktop.getDesktop().open(pdf);
    

    Regards

    Attachments:
    You must be logged in to view attached files.
    in reply to: PD4ML v3 to v4 migration: How to have the same rendering ?
    #33896

    Do you have payment in dollars ?, I need to buy a license but I cannot pay in euros.
    I will appreciate your answer

    in reply to: Licensing / Purchasing of PD4ML
    #33897

    Do you have payment in dollars ?, I need to buy a license but I cannot pay in euros.
    I will appreciate your answer

    in reply to: PD4ML v3 to v4 migration: How to have the same rendering ?
    #33898

    Now the generated PDF is different from yours:
    – I have 2 pages instead of 1
    – The table is truncated in my PDF
    – The size of my PDF is 10 Ko and yours is 103 Ko

    My document embeds TTF fonts, which makes the PDF file size to grow.

    In order to solve the table truncation issue you need to trigger pd4ml.setHtmlWidth() API call passing to it a value, that roughly matches the table width in pixels.

    Do you have payment in dollars ?,

    Let me know which license you’d like to order and we’ll prepare a corresponding order link in USD.

    in reply to: Licensing / Purchasing of PD4ML
    #33899

    Hi,
    I have got a valid PD4ML Evaluation License but I can just produce blank PDF documents. Probably due to the license key.

    The manual says:
    “Alternatively you may pass to PD4ML constructor a string with a serial number (obtained from the license email”)

    I haven’t got any license mail. But when logging in to the site I see my ”Activation key”, and my ”License number”, but I cannot find anything called ”serial number”. Passing activation key or license number in the PD4ML constructor do not help.

    Could you please assist?

    Best wishes,
    Anders Westerberg, Gothenburg SWEDEN

    in reply to: PD4ML Evaluation License – Serial number?
    #33900

    Hi Anders,

    I am afraid it is not related to the license key. By an invalid or missing key it should still produce PDFs, but watermarked with an evaluation banner. Try with a minimalist “Hello, World!” HTML to make sure it works in general.

    A blank page normally means the PDF is either corrupted by writing to a disk (file encoding issues etc) or the source HTMLis not parsed correctly (because of JavaScript, for instance)

    in reply to: PD4ML Evaluation License – Serial number?
    #33901

    Thanks for your prompt reply. Below my simple main method that generates a blank pdf document. Runing with java SDK 1.8.

    public static void main(String[] args) {
    try {
    PD4ML pd4ml = new PD4ML();
    String html = “<html><body>Hello World!</body></html>”;
    ByteArrayInputStream bais = new ByteArrayInputStream(html.getBytes());
    pd4ml.readHTML(bais);
    File pdf = File.createTempFile(“result”, “.pdf”);
    FileOutputStream fos = new FileOutputStream(pdf);
    pd4ml.writePDF(fos);
    Desktop.getDesktop().open(pdf);
    } catch (InvokeException | IOException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    }
    }

    Getting some warnings as below during execution:
    (evince:9270): Poppler-WARNING **: 16:25:30.061: Unsupported Annot Type
    (evince:9270): Poppler-WARNING **: 16:25:30.061: Unsupported Annot Type
    ** (evince:9270): WARNING **: 16:25:30.061: Unimplemented annotation: POPPLER_ANNOT_UNKNOWN, please post a bug report in Evince issue tracker (https://gitlab.gnome.org/GNOME/evince/issues) with a testcase.
    (evince:9270): Poppler-WARNING **: 16:25:30.061: Unsupported Annot Type

    All the best,
    Anders

Viewing 15 posts - 3,736 through 3,750 (of 4,234 total)