Hi
I’m saving a Word document to a PDF using the following C# code:
// Save the document in Aspose.Pdf.Xml format.
_doc.Save(strTempFile, SaveFormat.AsposePdf);
// Read the document in Aspose.Pdf.Xml format into Aspose.Pdf.
Aspose.Pdf.Pdf pdf = new Aspose.Pdf.Pdf();
pdf.BindXML(strTempFile, null);
// Instruct to delete temporary image files.
pdf.IsImagesInXmlDeleteNeeded = true;
// Produce the PDF file.
pdf.Save(strDestination);
The TOC of the Word document gets converted into Hyperlinks in PDF (blue underlined text). I would like to have the TOC converted into Hyperlinks to be able to navigate within the PDF document but the style should be applied from the Word document.
I’ve talked to the PDF team about other issues I’ve had an their response about this was:
=============
The underline style is generated by Aspose.Words in the XML. Please contact the Aspose.Words team if you are not satisfied with it.
<a title="blocked::
=============
I can send you the documents to reproduce the error but need an email address since I cant publish this document in the open space.
Thanks a lot for your help.
Tinu
Yes, please send the related files so that I could research the issue.
Please note that the attachments in forums are private and are available only to the author of the thread and members of Aspose team. So it is perfectly safe to publish it here. You can also make the thread private so that entire thread be invisible to other users.
Best regards,
Hi
Thanks for your reply. Didn’t know that attachments are private. In that case I will add it to this reply.
Thanks for your support.
Tinu
Thanks for the docs. I have logged this problem to our defect base (issue #1424). We will try to fix it in the next version. I will notify you when the hotfix will be available.
Best regards,
Hi Vladimir
Thanks for your reply. When Do you think will the hotfix be available?
Cheers
Tinu
Hotfix will be released in about three weeks from now.
Regards,
Hi Vladimir
I just got a response from the PDF team. There is a manual break between chapter 1 and 2. The PDF team first thought it would be a “widow/orphan” issue. After looking at this again there response before was:
====
- Page breakes and "widow/orphan control"
Sorry for my mistake. After
investigaing this problem further I found it is caused by the “column break” in
the Word document. Aspose.Words ignored this break in it’s xml.
Can you look at this again? You will find the document in a previous reply within this thread.
Thanks a lot for your help!
Tinu
Hi Tinu,
Thanks for relaying this problem to us. I will research the issue and inform you shortly.
Best regards,
We are currently discussing the issue with Aspose.Pdf team. I will keep you posted on our progress.
Best regards,
We have found that the fix for this issue should be made in Aspose.Pdf component. Aspose.Pdf guys said they will fix it soon.
Best regards,
Sorry for my mistake. We have fixed this bug. Please try the attachment before we publishing the hotfix.
Hi Tommy
The TOC is still displayed as hyperlinks. I’ve tested it with your attached version 3.3.0.4.
See the doc and pdf attached.
Thanks for your help
Tinu
Hi Tommy
Me again. You remeber we had the issue about the “column break / page break / widow-orphan”? With your latest version 3.3.0.4 the column break will be dealt with properly. Thanks!
The problem I see know is that the margins in the PDF produced by Aspose are not the same as it is in Word. The PDF produced with Adobe sets the margins correctly and we end up with the same amount of pages for this document. The margins dont look right when I’m using Aspose to generate the PDF. I’ve included some screenshots to explain what I mean.
Thanks a lot for looking at this for us.
Regards
Tinu
Dear Tinu,
1) As I have mentioned before, the hyperlink is generated by Aspose.Words in the xml:
1
#$TAB
Einleitung
#$TAB
#$REFPAGE(_TOC153171988)
2) In the Word document, the footer is set to be 30.55points "from edge". This is not supported in Aspose.Pdf. Aspose.Pdf has different header/footer mechanism with Aspose.Word which makes the header/footer in pdf can't be exactly the same as that in Word. We have added this into our plan and we will support it in future version.
Dear Tinu,
The fix for the hyperlinks in TOC will be available in the next hotfix of Aspose.Words in about a week.
Best regards,
Hi Tommy
Sorry I’ve complicated the whole thing now, got a bit confused. I thought that you asked me to test the TOC error in the Reply 65286. What actually Do you wanted me to test so I can confirm your hotfix?
Vladimir: Thanks for your info. Will you post a reply to this threat when the hotfix is available?
Apprechiate your support guys, well done.
Tinu
We have decided to publish the hotfix today. Check for download update in about 8 hours.
Best regards,
Dear Tinu,
Sorry for not making it clear. What I mean is the page breaking issue which is caused by the column break.
Hi Tommy
Page breaking issue has been solved, all good!
Thanks a lot
Tinu
Fixed in Aspose.Words 4.0.5. which is now available for download.