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

Free Support Forum - aspose.com

RTF to PDF - Issue about local link

Hello,

I encounter
an issue about local link during conversion of RTF file to PDF file.

How to
reproduce the problem:

I convert a RTF document “Input.rtf”
to PDF format.

The RTF document contains
a hyperlink targeting the local file “0200100184200129test.xlsx”.

As relative path, the link
works even if the RTF and linked file are moved in another location.

After conversion, I obtain
the PDF file “OutputUnexpected.pdf”.

Unexpected result: This
PDF file contains a static link including the relative path of JAR execution
context.

Expected result: This
PDF file should contain a local link relative to path of PDF file as shown by
the file “OutputExpected.pdf” <span style=“font-size:11.0pt;font-family:
“Calibri”,“sans-serif”;mso-ascii-theme-font:minor-latin;mso-fareast-font-family:
Calibri;mso-fareast-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:“Times New Roman”;mso-bidi-theme-font:minor-bidi;
mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA” lang=“EN-US”>(file
obtained by a no Aspose solution)
.

In the real
project, the above process is done dynamically.

The link in RTF file doesn’t exist
. See example: “Input for real projet.rtf”.

Currently, the link is found and replaced by using the following method:

rtfFile.getRange().replace(Pattern.compile("…”), new
ReplaceAndFormatEvaluatorDocumentLinks(), true);

I didn’t find any solution to
edit the RTF file (with aspose.words library) to obtain
the expected result even by adding the hyperlink in RTF file.

Please,
could you help me to solve this issue?

Thank
you.

<!–[if gte mso 9]>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:HyphenationZone>21</w:HyphenationZone>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>FR</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:DontVertAlignCellWithSp/>
<w:DontBreakConstrainedForcedTables/>
<w:DontVertAlignInTxbx/>
<w:Word11KerningPairs/>
<w:CachedColBalance/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
<m:mathPr>
<m:mathFont m:val=“Cambria Math”/>
<m:brkBin m:val=“before”/>
<m:brkBinSub m:val="–"/>
<m:smallFrac m:val=“off”/>
<m:dispDef/>
<m:lMargin m:val=“0”/>
<m:rMargin m:val=“0”/>
<m:defJc m:val=“centerGroup”/>
<m:wrapIndent m:val=“1440”/>
<m:intLim m:val=“subSup”/>
<m:naryLim m:val=“undOvr”/>
</m:mathPr></w:WordDocument>
<![endif]–>

<!–[if gte mso 10]>

/* Style Definitions */ table.MsoNormalTable {mso-style-name:"Tableau Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin;}

<![endif]–>

Regards


Samuel VILLENEUVE

Sopra group.


<!–[if gte mso 10]>

/* Style Definitions */ table.MsoNormalTable {mso-style-name:"Tableau Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin-top:0cm; mso-para-margin-right:0cm; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0cm; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin;}

<![endif]–>

Hi Samuel,


Thanks for your inquiry.

While using the latest version of Aspose.Words for Java i.e. 13.4.0, I managed to reproduce this issue on my side. I have logged this issue in our bug tracking system. The issue ID is WORDSJAVA-724. Your request has also been linked to this issue and you will be notified as soon as it is resolved. Sorry for the inconvenience.

Best regards,

Hello,

Please, could you provide us an indication about correction of issue WORDSJAVA-724 ?

Thank you.

Regards

Samuel VILLENEUVE

Hi Samuel,


Thanks for your inquiry. Unfortunately, your issue is not resolved yet. Currently, this issue is pending for analysis and is in the queue. Unfortunately, at the moment I cannot provide you any reliable estimate for the fix. You will be notified via this thread as soon as it is resolved. Sorry for the inconvenience.

Best regards,

Hello,

Please, could you provide us a status on WORDSJAVA-724?

Thank you.

Regards.

Hi Samuel,

Thanks for your inquiry. Unfortunately, your issue is not resolved yet. I am afraid, this issue is still pending for analysis. We will inform you as soon as this issue is resolved. We apologize for any inconvenience.

Best regards,

The issues you have found earlier (filed as WORDSJAVA-724) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.