I have a PDF file, I use the Document class to open it, and then use Save(), the pages in Document.Pages have changed, their HashCode has changed. Please check the attached PDF file.
WzControl.pdf (396.6 KB)
We have tested the scenario using the latest version of Aspose.PDF for .NET 22.10 and have not found the shared issue. So, please use Aspose.PDF for .NET 22.10.
I tested Aspose.PDF for .NET 22.10. The issue still exists, here is my code
static void Main(string[] args)
{
var filePath = “D://WzControl.pdf”;
var tempPath = “D://WzControl2.pdf”;
License.Init();
Document _document = new Document(filePath);
Console.WriteLine("pages 1");
foreach (var page in _document.Pages)
{
Console.WriteLine(page.GetHashCode());
}
_document.Save(tempPath);
Console.WriteLine("");
Console.WriteLine("pages 2");
foreach (var page in _document.Pages)
{
Console.WriteLine(page.GetHashCode());
}
Console.ReadLine();
}
We have logged this problem in our issue tracking system as PDFNET-52924 . You will be notified via this forum thread once this issue is resolved.
We apologize for your inconvenience.