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

Free Support Forum - aspose.com

Bookmark links not working after converting word to pdf

Hi,

I’m attaching word and pdf documnets. After converting word document to pdf, bookmarks are not working.

just test.pdf (212.6 KB)
just test.docx (20.2 KB)

@c3iapitest I cannot reproduce the problem on my side. I have used the following simple code for testing and link to bookmarks works properly in the output PDF document:

Document doc = new Document(@"C:\Temp\in.docx");
doc.Save(@"C:\Temp\out.pdf");

out.pdf (36.7 KB)
As I can see you output document was produced or postprocessed by PDFsharp. Most likely the links were broken after this postprocessing.

Thanks for the update.

Here we are using PDFSharp for combining pdf documents. Is there any way to combine two pdf documents with Aspose words.

Please suggest me.

@c3iapitest You can use Aspose.PDF to merge PDF documents.
If the PDF document you are merging were produced by conversion from MS Word documents, you can merge documents before converting to PDF using Aspose.Words.

Could you please send me sample code to merge word documents. It could help us

@c3iapitest Sure, code is pretty simple:

// Open documents.
Document doc1 = new Document(@"C:\Temp\in1.docx");
Document doc2 = new Document(@"C:\Temp\in2.docx");
// Append the second document to the first one.
doc1.AppendDocument(doc2, ImportFormatMode.KeepSourceFormatting);
// Save the result.
doc1.Save(@"C:\Temp\out.pdf");