We are exporting the values of form fields, which is working perfect as long the document we process does not contain signatures.
If a document is signed, we receive the following exception, when we access the fields property:
var doc = new Document(new MemoryStream(content));
foreach (var field in doc.Forms.Fields) {…}
An attempt was made to move the position before the beginning of the stream.
Log
An attempt was made to move the position before the beginning of the stream.
at System.IO.MemoryStream.Seek(Int64 offset, SeekOrigin loc)
at #=zyZ6tZ6UcBtdU82oFB7JkEofNSuGJy82FDc5G5HxVRcd$.#=zsd7hOIg=(Int64 #=zO$h_lgs=, SeekOrigin #=zqIt78U4=)
at #=zyaCnUIOQ2a9lZA_lmyvaT0xPa$qd$7xXLw==.#=zjz3ey7E=(Byte[] #=zQx5Cl8c=, Int32 #=zO$h_lgs=, Int32 #=zQ$HyLnU=, Int32 #=zBW0rfIM=)
at #=zV7svFHCgDIEG9ZsT701t1f8LTroLM46XZwEUm8h4KF8Q1TWGjsG4bXYqEYZPe8e7xU0h0L1o9bxgnnbCnw==.#=zb8vq1FQ=(#=z69maIet4C$Ajhi5X5X1aSBiLEDxmW81TUw== #=zJ2V8XNc=, #=z8wqS1dWSpWKq8A6I3_EnVVn2nazr #=z$00Vl5g=)
at Aspose.Pdf.Forms.Signature.#=zy3umWHxBj7BHgOMGwQvcpMg=(#=z69maIet4C$Ajhi5X5X1aSBiLEDxmW81TUw== #=zJ2V8XNc=, #=z8wqS1dWSpWKq8A6I3_EnVVn2nazr #=z$00Vl5g=)
at Aspose.Pdf.Forms.Signature…ctor(#=z69maIet4C$Ajhi5X5X1aSBiLEDxmW81TUw== #=zJ2V8XNc=, #=z8wqS1dWSpWKq8A6I3_EnVVn2nazr #=z$00Vl5g=)
at Aspose.Pdf.Forms.PKCS7Detached…ctor(#=z69maIet4C$Ajhi5X5X1aSBiLEDxmW81TUw== #=zJ2V8XNc=, #=z8wqS1dWSpWKq8A6I3_EnVVn2nazr #=z$00Vl5g=)
at Aspose.Pdf.Forms.SignatureField…ctor(#=zKDi6weuPF0KFdCxX7iW74xYtfRHCMzE4ZQ== #=zob3qGz0=, Document #=z$00Vl5g=)
at Aspose.Pdf.Forms.Field.#=zw49qYhg=(#=zKDi6weuPF0KFdCxX7iW74xYtfRHCMzE4ZQ== #=zbnG$ZOc=, Document #=z$00Vl5g=)
at Aspose.Pdf.Forms.Form.#=zbe0uhng=.get_Current()
It looks as the constructor for the signature fields has a problem.
We are using Version 22.5.0.
Does