HTML to PDF / DOCX / RTF Java converter library Forums PD4ML Forums Technical questions / Troubleshooting No password given com.pd4ml.InvalidPasswordException: No password given

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #37684

    Hello,

    We have a case where we create a PDF file and than append a few more to it (created not by PD4ML library, but somewhere else).
    We noticed an issue with a specific PDF file that throw an error when we try to append it (while it works for all other pdf).

    We are limited to Java8 and we use PD4ML v4.0.15 (and I just upgraded to 4.0.18, same issue)

    Here is how I merge pdf

    private void merge(File file, PdfDocument pdfAppend) throws NotesException, InvokeException, IOException {
    InputStream fis = new FileInputStream(file);
    PdfDocument pdf = new PdfDocument(fis, null);

    pdf.append(pdfAppend); // error happens here, line 198
    OutputStream fos = new FileOutputStream(file);
    pdf.write(fos);

    fos.close();
    fis.close();
    }

    file is a PDF file I created using PD4ML library
    pdfAppend is an external pdf file

    Here is error trace

    [030930:015348-00007FA557073700] 01/18/2024 04:59:06 PM HTTP JVM: com.pd4ml.InvalidPasswordException: No password given
    [030930:015348-00007FA557073700] 01/18/2024 04:59:06 PM HTTP JVM: at com.pd4ml.PdfDocument.super(y:967)
    [030930:015348-00007FA557073700] 01/18/2024 04:59:06 PM HTTP JVM: at com.pd4ml.pdf.PdfDocumentBase.append(y:2355)
    [030930:015348-00007FA557073700] 01/18/2024 04:59:06 PM HTTP JVM: at Report.merge(Report.java:198)

    I confirm we do not set any password.

    Any idea would be very much welcome!

    Thanks.

    #37686

    The issue report has been forwarded to the helpdesk. We’ll contact you soon

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

You must be logged in to reply to this topic.