Hi
I want to view a pdf in smart client.In web client we are creating a html area and we can show a pdf file. Below is the code for this.(used a staic file for example)
'<html>'+
'<body>'+
'<embed src="http://localhost:8080/Tutorial1-PluginHowTo-Part1.pdf" width=800px height=800px alt="hi">'+
'</body>'+
'</html>'
I have used JFXWebViewer for smart client and use the following code to display the file(code for viewing the text and pdf file).
var p = file.getAbsolutePath().split('\\').join('/');
var path = 'file:///'+p
htmlContent = '<html> '+
'<body> '+
'<embed src="'+path+'" width=800px height=800px alt="hi"></embed> '+
'</body>'+
'</html>'
replacedHtmlContent = htmlContent.replace('<![CDATA[', '').replace(']]>', '').replace("'", "");
webPanel.loadContent(replacedHtmlContent);
Which show the text file but not showing the pdf file. Can you share me any mistake I have done.
Thanks in advance.
Thanks
Satya