pdf.pdf (317.4 KB)
for (int i = 1; i <= page.Artifacts.Count; i++)
{
var artifact = page.Artifacts[i];
switch (artifact.Subtype)
{
case pdf.Artifact.ArtifactSubtype.Header:
case pdf.Artifact.ArtifactSubtype.Footer:
case pdf.Artifact.ArtifactSubtype.Watermark:
page.Artifacts.Delete(artifact);
break;
}
}
throw:Page contents was changed after reading artifacts on page.
The above code works fine for many files, but throws an error for this specific document!
@xhuigy
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): PDFNET-54665
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
I got the same error with the same code.
Tested OSs were Win7 and Win10
.NET target platform is .net 6.0
Using SDK: Aspose.PDF for .Net 24.6
2022年新知教育专升本管理学冲刺模拟卷(1).7z (418.1 KB)