Hi, I'm using Aspose.PDF for .Net v6.2.0.
When I try to use PdfFileEditor to split an existing document that contains highlighting into individual pages, only the highlighting on the first page is retained. Any highlighting on page 2 or higher is stripped.
I have attached a sample source file and 2 different code techniques that I have tried. Firstly, the prefered methods is using SplitToPages:
var fileEditor = new Aspose.Pdf.Facades.PdfFileEditor(); var pageStreams = fileEditor.SplitToPages("source.pdf"); for (int i = 0; i < pageStreams.Length; i++) { var outputFilename = string.Format("SplitPage{0}.pdf", i + 1); using (FileStream fs = new FileStream(outputFilename, FileMode.Create)) { pageStreams[i].WriteTo(fs); } }
But I have also tried using the Extract method:
var fileInfo = new Aspose.Pdf.Facades.PdfFileInfo("source.pdf"); var fileEditor = new Aspose.Pdf.Facades.PdfFileEditor(); for (int i = 1; i <= fileInfo.NumberOfPages; i++) { var outputFilename = string.Format("ExtractedPage{0}.pdf", i); fileEditor.Extract("source.pdf", new int[] { i }, outputFilename); }This is quite urgent for us, as we are production ready with a new application and this bug will stop us from deploying.Regards
Dave