Inherit zoom bookmarks are broken/removed after Adobe Reader Save As

Users complained that the merged pdfs produced did not have Inherit Zoom turned on so I modified the code like so:

var mergedPdf = new Document();

foreach (var file in Directory.GetFiles(@“c:\temp”, “*.pdf”))
{
var pdf = new Document(file);
mergedPdf.Pages.Add(pdf.Pages);

var outline = new OutlineItemCollection(mergedPdf.Outlines) { Title = Path.GetFileNameWithoutExtension(file) };
//outline.Destination = new GoToAction(mergedPdf.Pages[pageCount]);
outline.Destination = new XYZExplicitDestination(pageCount, 0, mergedPdf.Pages[pageCount].MediaBox.Height, 0);
mergedPdf.Outlines.Add(outline);

pageCount += pdf.Pages.Count;
}

var docInfo = mergedPdf.Info;
docInfo.Title = “Title”;
docInfo.Author = “Company”;

mergedPdf.Form.Flatten();

var editor = new PdfContentEditor(mergedPdf);
editor.ChangeViewerPreference(ViewerPreference.HideMenubar);
editor.ChangeViewerPreference(ViewerPreference.PageModeUseOutlines);

editor.Save(@“c:\temp\Merged.pdf”);

That fixed the issue. However, now when the resulting pdf is saved as another filename, reduced, or optimized in Adobe Reader, the bookmarks are either broken or removed altogether.

Save As → new file: bookmarks remain but are broken
Save As → Reduced/Optimized PDF: bookmarks are removed

Here’s a link to samples of each case: Samples.zip

@joe_lopez
We are looking into it and will be sharing our feedback with you shortly.

@joe_lopez

Are you saying that the bookmarks are removed when you re-save the file using Adobe Reader? Can you please share the step to reproduce the issue in our environment so that we can test and address it accordingly?

Videos.zip (9.4 MB)

Sorry, I should have said Adobe Acrobat Pro. Attached are a couple of videos created by a user.

@joe_lopez

Is it possible if you can run the same code snippet with 24.5 version (which is the latest one) and Save As the generated file in Adobe Acrobat? If issue still persists, please let us know and we will generate an investigation ticket in our issue tracking system to further analyze this case.