mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-09-20 20:07:57 +08:00
fix bug where cross reference stream subsections were skipped
a single cross-reference stream may contain multiple disjoint runs of object numbers, previously we only took the first now we load all objects. adds indexer to array token for ease-of-use. adds page number and bounds information to all form fields.
This commit is contained in:
@@ -39,19 +39,20 @@
|
||||
using (var document = PdfDocument.Open(GetFilename(), ParsingOptions.LenientParsingOff))
|
||||
{
|
||||
var form = document.GetForm();
|
||||
Assert.Equal(16, form.Fields.Count);
|
||||
Assert.Equal(18, form.Fields.Count);
|
||||
}
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void GetsEmptyFormFields()
|
||||
{
|
||||
using (var document = PdfDocument.Open(GetFilename(), ParsingOptions.LenientParsingOff))
|
||||
{
|
||||
var form = document.GetForm();
|
||||
var annots = document.GetPage(1).ExperimentalAccess.GetAnnotations().ToList();
|
||||
Assert.Equal(16, form.Fields.Count);
|
||||
}
|
||||
}
|
||||
//[Fact]
|
||||
//public void GetFormFieldsByPage()
|
||||
//{
|
||||
// using (var document = PdfDocument.Open(GetFilename(), ParsingOptions.LenientParsingOff))
|
||||
// {
|
||||
// var form = document.GetForm();
|
||||
// var fields = form.GetFieldsForPage(1).ToList();
|
||||
// var page = document.GetPage(1).ExperimentalAccess.GetAnnotations().ToList();
|
||||
// Assert.Equal(16, fields.Count);
|
||||
// }
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user