Skip to content

Cannot delete page when /Kids attribute is missing #248

Closed

Description

@ediweissmann

The /Kids attribute is missing because the /Parent ref is wrong.
We should detect this and use the existing fallback mechanism for knownParent

java.lang.NullPointerException: Cannot invoke "org.sejda.sambox.cos.COSArray.removeObject(org.sejda.sambox.cos.COSBase)" because "kids" is null
	at org.sejda.sambox.pdmodel.PDPageTree.remove(PDPageTree.java:564)
	at org.sejda.sambox.pdmodel.PDPageTree.remove(PDPageTree.java:527)
	at org.sejda.sambox.pdmodel.PDDocument.removePage(PDDocument.java:181)
	at org.sejda.impl.sambox.component.PDDocumentHandler.removePage(PDDocumentHandler.java:336)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions