1

Can anyone help me with this issue? I'm new to programming and now I came across this issue where. I have Hyperlinks in the final Generated PDF(While Converting from RTF to PDF). When I try to click on the links in the PDF they are opening in the same iframe window Instead of Opening New Window.

I wish to have my Hyperlinks open in new window Whenever User clicks on the links. I am using latest version of Aspose PDF. I tried using following code.

inputFileExt = Utilities.FormatNullString( Utilities.getFileSuffix( srcFilePath ));
outputFileExt = Utilities.FormatNullString( Utilities.getFileSuffix( destFilePath ));

if ( fileDest.exists() )
    fileDest.delete();

Document doc = new Document(srcFilePath);
if((inputFileExt.equals("doc")||inputFileExt.equals("docx")||inputFileExt.equals("rtf")||inputFileExt.equals("txt")) && outputFileExt.equals("pdf") )
{
     PdfSaveOptions options = new PdfSaveOptions();
     options.setOpenHyperlinksInNewWindow(true); 


     doc.save(destFilePath, options);

I have also referred the links below where I could not find the answer.

Pang
  • 9,564
  • 146
  • 81
  • 122
nik898
  • 15
  • 4

0 Answers0