Skip to content

Cannot delete page when /Kids attribute is missing #248

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions