Back to Blog
Pdf reader x7/8/2023 ![]() Public bool Merge(MergeItem sourceFiles, string destFile) PdfBookmarkEditor bookmarEditor = new PdfBookmarkEditor() īookmarEditor.CreateBookmarkOfPage(names, pages) Public bool AddBookmarks(MergeItem items, string strSource, string strDest) Public bool AddWatermark(MergeItem items, string strSource, string strDest)įileStream inputStream = new FileStream(strSource, FileMode.Open) įileStream outputStream = new FileStream(strDest, FileMode.Create) Ī pdfDoc = new (inputStream) Ī stamper = new (currItem.Watermark) Merger.AddWatermark(items, “C:\Temp\dest_tmp2.pdf”, “C:\Temp\result.pdf”) Merger.AddBookmarks(items, “C:\Temp\dest_tmp1.pdf”, “C:\Temp\dest_tmp2.pdf”) Merger.Merge(items, “C:\Temp\dest_tmp1.pdf”) PdfMergeExample merger = new PdfMergeExample() Public MergeItem(string filename, string bookmark, int pages, string watermark) The result file is result.pdf - bookmarks are fine.Īfter that the result.pdf is opened with Adobe Reader 11 and saved as result_corrupt_bookmarks.pdf - bookmarks are broken. After that bookmarks and watermarks are added. ![]() I tested some other pdf documents (not created with Aspose tools) with a lot of bookmarks. SI-bookmarks_working.pdf saved to new directory, close document, reopen new pdf => After this, bookmarks are fine => SaveAs with Adobe Reader 9.5 might be just a file copy operation. Maybe this works because Adobe Reader 9.5 has no features to edit pdf dcoument content. SI-bookmarks_working.pdf saved to new directory, close document, reopen new pdf => After this bookmarks are fine. SI-bookmarks_working.pdf saved to new directory, close document, reopen new pdf => After this, bookmarks are broken SI-bookmarks_working.pdf => Bookmarks are fine
0 Comments
Read More
Leave a Reply. |