PdfContentEditor pdfContentEditor = new PdfContentEditor();
pdfContentEditor.BindPdf(enumerateFile.FullName);
// Replace text on all pages
pdfContentEditor.ReplaceText(“xxx”, “1111”); // throw System.IO.EndOfStreamException
// Save output PDF
pdfContentEditor.Save(Path.Combine(textBox4.Text, enumerateFile.Name));
System.IO.EndOfStreamException
HResult=0x80070026
Message=无法在流的结尾之外进行读取。
Source=mscorlib
StackTrace:
在 System.IO.BinaryReader.ReadByte()
在 . ()
在 ..( , & , )
在 .. ( , & )
在 . ( , & )
在 .. ( , & )
在 . ( , & )
在 . ( )
在 .(Int32 , Int32 )
在 . (Int32 , Int32 )
在 . ()
在 .( )
在 .(String )
在 . ()
在 …ctor( )
在 . ()
在 Aspose.Pdf.Page…ctor( )
在 Aspose.Pdf.PageCollection.(Int32 )
在 Aspose.Pdf.PageCollection.(Int32 )
在 Aspose.Pdf.Text.TextFragmentAbsorber.Visit(Document pdf)
在 Aspose.Pdf.Facades.PdfContentEditor.ReplaceText(String srcString, Int32 thePage, String destString, TextState textState)
在 Aspose.Pdf.Facades.PdfContentEditor.ReplaceText(String srcString, String destString)
I use 18.4 from nuget 22.zip (521.0 KB) I upload the file else