Unplanned
Last Updated: 29 Sep 2026 10:32 by ADMIN
ADMIN
Martin
Created on: 29 Sep 2026 10:32
Category: PdfProcessing
Type: Bug Report
0
PdfProcessing: InvalidCastException is thrown when importing a PDF with integer BorderThickness in its tagged structure tree
Importing the attached PDF throws InvalidCastException while parsing its structure tree. A /Layout attribute sets /BorderThickness to integer scalar 1. ISO 32000-1:2008 allows this value as a number or a four-entry array; a scalar applies to all four edges. The importer handles real values and arrays, but not PdfInt.

Setting PdfImportSettings.IgnoreMarkedContent to true currently skips marked-content containers but still imports the structure tree, so it does not avoid the exception.

Expected: Import integer and real scalar values as thickness for all four edges; preserve four-entry array values. When IgnoreMarkedContent is true, skip structure-tree import while still importing pages.
0 comments