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

Free Support Forum - aspose.com

URL is Breaking While Converting Word document into PDF File

Aspose.Word

Scenario1:-

Description:

Once Word Document is created by using Aspose.word after that if we manually converted that word document into PDF file, the URL which is present in that PDF file is not trimmed, it’s successfully taking entire URL. Please refer Attachment 1.

Save As PDF Format

Scenario2:-

Description:

Once Word Document is created by using Aspose.word after that if we automatically converted that word document into PDF file by using Save Format Type in doc.Save (destination, format); Aspose.Word, while opening the URL which is present in that PDF file by using browser it’s not taking entire URL it’s taking only first line of the URL. Please refer Yellow Color Highlighted part in the Attachment 1.

Hi,

Thanks for your inquiry. To ensure a timely and accurate response, please attach the following resources here for testing:

  • Your input Word document(s)
  • Aspose.Words generated output PDF file(s) showing the undesired behavior
  • Please attach your expected documents here for our reference. We will investigate the structure of your expected documents as to how you want your final outputs be generated like. You can create expected documents by using Microsoft Word.
  • Please create a standalone simplified console application (source code without compilation errors) that helps us reproduce your specific problems on our end and attach it here for testing.

As soon as you get these pieces of information ready, we'll start further investigation into your issues and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip them and Click 'Reply' button that will bring you to the 'reply page' and there at the bottom you can include any attachments with that post by clicking the 'Add/Update' button.

Best regards,

Hi,

I have Attached the ZIP file which contains the following file
1.Word Document file which contains URL.
2. Automatically Created PDF file by using Console Application(Entire URL is Not Taking).
3. Manually Created PDF file.(Entire URL is taking)

Hi there,


Thanks for sharing additional information. We have tested the scenario and noticed the reported URL breaking issue. We have logged a ticket WORDSNET-15381 in our issue tracking system for further investigation and rectification. We will notify you as soon as it is resolved.

We are sorry for the inconvenience.

Best Regards,

Hi,

When will be that issue will fix,can you tell me which updated Aspose. Word package contain resolved the issue which i raised.

Hi there,


Thanks for your inquiry. I am afraid we cannot share any timeline at the moment, as we have recently noticed the issue. It is pending for investigation, as soon as its investigation is completed then we will be in a good position to share any ETA with you.

Thanks for your patience and cooperation.

Best Regards,
Hi there,

Thanks for your patience. We have investigated the issue WORDSNET-15381 and found it is not a bug but expected behavior. Please note Multi-line text does not have hyperlink set. So text is represented in PDF as 3 separate strings. Aaspose.Words and MS Word writes this text differently (different operators), but everything is according to the specification.

It seems Acrobat Reader parses this strings in different manner, in MS Words output all three strings are converted to single hyperlink, while in Aspose.Words output only first string is interpreted as hyperlink. Please note that in Chrome for both documents only first string is converted to hyperlink.

If you want the whole text to be hyperlink, you should set "Hyperlink" property to it in MS Word or in Aspose.Word. Then everything will work as expected.

Best Regards,

Hi,


As you suggested i have tried URL breaking scenario in my environment ,but after setting the hyperlink property for the Word document Merge field also if i am converted my Word document file to PDF file using console but i could not able to navigate my Hyperlink that is multi line URL format ,So can you please share sample console code,sample word document and sample output PDF file generated by console app.

Hi there,


Thanks for your feedback. Please find attached updated sample input Word file and output PDF document. I am unable to find any issue with URL in resultant PDF document. However, if the issue persists at your end then please share your sample input and output documents here, we will look into the issue and will guide you accordingly.

Document document = new Document(“D:/Downloads/link.doc”);<o:p></o:p>

document.Save(“D:/Downloads/link_175.pdf”);


Best Regards,