Skip to content

exception "PdfReader not opened with owner password" #85

@VladimirAlexiev

Description

@VladimirAlexiev
Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: PdfReader not opened with owner password
        at com.itextpdf.text.pdf.PdfReaderInstance.getImportedPage(PdfReaderInstance.java:80)
        at com.itextpdf.text.pdf.PdfCopy.getImportedPageImpl(PdfCopy.java:388)
        at com.itextpdf.text.pdf.PdfCopy.getImportedPage(PdfCopy.java:255)
        at at.laborg.briss.utils.DocumentCropper.copyToMultiplePages(DocumentCropper.java:100)
        at at.laborg.briss.utils.DocumentCropper.crop(DocumentCropper.java:62)
        at at.laborg.briss.BrissSwingGUI.savePDF(BrissSwingGUI.java:370)
        at at.laborg.briss.BrissSwingGUI.lambda$showSaveFileDialog$9(BrissSwingGUI.java:335)
        at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
        at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
        at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
        at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
        at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

Note: I thought the culprit are annotations added by SumatraPDF, but it also happens on the original file

Versions:

  • briss 2.0 alpha5
  • Windows 10,
  • cygwin,
  • openjdk version "22" 2024-03-19
    OpenJDK Runtime Environment Temurin-22+36 (build 22+36)
    OpenJDK 64-Bit Server VM Temurin-22+36 (build 22+36, mixed mode, sharing)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions