Hi,
We are using Aspose.pdf 19.2 and we find that if we merge a PDF file(with a bookmark, tag or attachment in it) with other PDF files, the bookmark, tag or attachment will be gone due to the page number is changed if it isn’t the 1st PDF. If it’s the 1st PDF to be merged, the bookmark, tag and attachment will still be there.
Here’s our code to merge file
// Open first document
Document pdfDocument1 = new Document(“Concat1.pdf”);
// Open second document
Document pdfDocument2 = new Document(“Concat2.pdf”);
// Add pages of second document to the first
pdfDocument1.Pages.Add(pdfDocument2.Pages);
// Save concatenated output file
pdfDocument1.Save(“ConcatenatePdfFiles_out.pdf”);
Here’s our test pdf
bookmark_target_attachment_tags.pdf (3.2 MB)
Please have a check. Thanks.