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

Free Support Forum - aspose.com

Link is truncated in output file(ECDCTS-9344)

Hi Team,

We are trying to transform rtf format file into pdf file. In output file long link is truncated.

rtf(input):

https://www.contratacion.euskadi.ejiedes.eus/w32-kperoc/es/ac71aBusquedaRegistrosWar/certificado/imprimir/11111111H/59189/1614090133927

PDF(output):

https://www.contratacion.euskadi.ejiedes.eus/w32-kperoc/es/ac71aBusquedaRegistrosWar/certificado/imprimir/11111111H/59189/1614

We have used following code for transformation

String fileName = "C:\\Docs\\02_LINKS LARGOS.rtf";
com.aspose.words.Document document = new com.aspose.words.Document(fileName);
document.save("C:\\Docs\\02_LINKS LARGOS.pdf");

Attaching zip files for reference.
files-2.zip (235.3 KB)

Thanks,
Arvind

@rnara As I can see the link in your input document is not actually a hyperlink, but a simple text painted in blue. So both Aspose.Words and MS Word export it as a simple text in PDF. I did not noticed any difference in Aspose.Words and MS Word produced PDF documents.
ms.pdf (116.0 KB)
aspose.pdf (128.8 KB)

Hi,

If we hover over blue text in output file the link gets truncated after …/59189/1614 but in ms word output file it remains same.

Thanks,
Arvind

@rnara Thank you for additional information. To make hyperlinks to be exported properly to PDF, they should be represented with HYPERLINK fields in the source document. But in your document they are not.
I have logged the issue as WORDSNET-24789. We will further investigate the issue and let you know once it is resolved or we have more information for you.

Hi Team,

Any update on this issue ?

Thanks,
Arvind

@rnara The issue is currently in the queue for analysis. We will be sure to keep you posted and let you know once the issue is resolved or we have more information for you.

@rnara The source document has no hyperlinks, it is a simple blue text. Accordingly, in the output PDF document links are not created either by MS Word or Aspose.Words. The link is created by the PDF viewer, based on the analysis of the document text. Therefore, incorrect detection of the beginning and end of the URL is not a bug of Aspose.Words, but a bug of Adobe Reader.

We can only assume that the bug is caused by different markup of text blocks in Aspose.Words and MS Word, but we don’t try to repeat MS output identically, but only mimic its output. Therefore, it is recommended to create hyperlinks explicitly, since some viewers may not have such feature.

We are going to close the issue as not a bug.