PD4ML v4 Forums PD4ML Forums Licensing / Purchasing of PD4ML PD4ML Evaluation License – Serial number?

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #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

    #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)

    #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

    #33902

    BTW, the version i try is pd4ml-4.0.7.jar

    //Anders

    #33903

    Actually it creates a pdf file, which is not empty, see attachment, but it’s blank in my pdf reader.

    //Anders

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

    This thread can be closed. It works when compiling and running outside eclipse. Sorry for pestering you!

    All the best,
    Anders

    #33906

    Hmm… It seems the issue is JDK-specific. We experienced that before with OpenJDK older than v9 – for some reason it print typographical dash character instead of minus, which makes the PDF code invalid:

    1.48148 0 0 ?1.48148 0 1 cm
    0 ?1 1 0 0 0 cm
    0 j
    2 J

    We implemented a workaround more than one year before, and the issue is not reproducible anymore on our side. It strange you still face with it.

    Try the JVM parameter as suggested by one of our customers:
    -Djava.locale.providers=COMPAT

    Does it change anything in your Eclipse environment?

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.