Problem with pdf embeded

I’m trying to embed a pdf in the servoy solution webclient, but i can’t view.

First of all i create a HTML_AREA field, and associate a variable called html.

var html = "<iframe src='file:///Users/sergio/Downloads/User_Manual_OpenStage_20_SIP.pdf' height='1100' width='850' ></iframe>";

But when i run the solution, don’t show anything inside. But if i save the web as html, and run in localy and show perfect the pdf. Any idea?

You should wrap HTML inside HTML tags to be used inside HTML_AREA’s.

var html = "<html><iframe src='file:///Users/sergio/Downloads/User_Manual_OpenStage_20_SIP.pdf' height='1100' width='850' ></iframe></html>";

Hope this helps.

I put exactly with the html tags, but nothing appear in the browser

When running in the context of Servoy (as in Tomcat server), you can’t display files in an iframe from your computer using file:// – it is a security issue.

Put your pdf somewhere in Servoy’s webapps folder and insert an absolute or relative URL to the iframe src attribute.

I put in the webapps folder, but still not working, the complete route is:

var html = “”;
but no way

This is what David means:

var html = "<html><iframe src='http://yourserver_ip:8080/Browser_Suite_FAQ.pdf' height='1100' width='850' ></iframe></html>";

Finally works, only i have to define some path in the server configuration, and put into the server folder. Thanks for all the help