showing pdf in smart client using svyJFXWebView module

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

I’d be surprised if JFX web view component is pdf compatible. Quite a different beast than displaying text/html.

Hi David

Then, would you like to share me how to show a pdf within servoy (smart client) :(

Thanks,
Satya

There used to be a free version of JPedal (https://www.idrsolutions.com/javafx-pdf-viewer) which used to be the goto solution. Not sure what the options are for smart client these days.

satya.sahu:
Then, would you like to share me how to show a pdf within servoy (smart client) :(

You could try Mozilla PDF.js in svyJFXWebView.