Posted 14 September 2023, 6:40 am EST
Hi,
I’m testing the library for an accessibility project and initially I was using an older version (5.1.0.793) but now I switched to the last version 6.2.2 and I’m having some problems with the PDF accessibility checker (PAC).
To be more specific I had an image with the figure tag and a couple of attributes:
StructElement seImage = new StructElement("Figure") { DefaultPage = lpage };
Attr thAttrBBox = new Attr();
thAttrBBox.Properties.Add("O", "Layout");
thAttrBBox.Properties.Add("BBox", new float[] { ip.X, ip.Y, l, h });
seImage.Attrs.Add(new AttrRevision(thAttrBBox, 0));
Changing the version, since there is no more Properties I changed the code into:
StructElement seImage = new StructElement("Figure") { DefaultPage = lpage };
Attr thAttrBBox = new Attr();
thAttrBBox.PdfDict.Dict.Add(new PdfName("O"), new PdfString("Layout"));
thAttrBBox.PdfDict.Dict.Add(new PdfName("BBox"), new PdfArray(new float[] { ip.X, ip.Y, l, h }));
seImage.Attrs.Add(new AttrRevision(thAttrBBox, 0));
Now the SR still read the PDF in the right way, but when I try to load the PDF on PAC (or on https://check.axes4.com/en/) there seems to be some kind of error. PAC announces a System.InvalidCastException.
Am I doing something wrong or there is some kind of bug?
Kind regards,
Simona