We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Bookmarks not working after pdf document is saved with Adobe Reader X


Thank you and share a Zip of this application project. We will take a closer look and share our findings with you.

Zip files http://www.brahma360.com/general/BookmarkTest.zip

Document enclosed was created as a pack and then this code was run to add the bookmarks.

The Document_pack.pdf was created with using aspose software else where and this code was applied to create the bookmarks. The second document was created by loading into Adobe Acrobat and then saving, as you can see the bookmarks are then broken.

You can test this yourself by loading and saving with Adobe.

// Open document
Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(document_pack_filepath);

// Delete all bookmarks

Aspose.Pdf.OutlineItemCollection pdfOutline = new Aspose.Pdf.OutlineItemCollection(pdfDocument.Outlines);
pdfOutline.Title = “Home Page”;
pdfOutline.Italic = true;
pdfOutline.Bold = true;

pdfOutline.Action = new Aspose.Pdf.Annotations.GoToAction(1);
// Add bookmark in the document’s outline collection.

int count = 0;
foreach (int page in pages)
if ((count + 1) < pages.Length)
// Create a parent bookmark object
Aspose.Pdf.OutlineItemCollection pdfReportOutline = new Aspose.Pdf.OutlineItemCollection(pdfDocument.Outlines);
pdfReportOutline.Title = pageTitles[count].Replace(".pdf", “”);
pdfReportOutline.Italic = true;
pdfReportOutline.Bold = true;

	pdfReportOutline.Action = new Aspose.Pdf.Annotations.GoToAction(pages[count + 1]);
	// Add bookmark in the document's outline collection.


// Save updated file

Interestingly, I decided to created a fresh app just to join three PDF’s together and the line with the Goto(pagenum) went green and mentioned this bug. However it is gone now but it said use Aspose.Pdf.Page something, perhaps you could advise me what this code should be instead of this

pdfReportOutline2.Action = new Aspose.Pdf.Annotations.GoToAction(3);


Ok, figured it out, was not seeing it, replaced this

pdfReportOutline2.Action = new Aspose.Pdf.Annotations.GoToAction(3);

With this

pdfReportOutline2.Action = new Aspose.Pdf.Annotations.GoToAction(pdfDocument.Pages[3]);



It is nice to hear from you that the problem has been resolved. Please feel free to contact us whenever you require any further assistance.