Page 1 of 1

PDFs embeded?

Posted: Wed Jun 22, 2011 11:16 am
by leatherlips
If I have a tab panel, and wanted one of those tabs to contain a PDF file (while the other(s) contain fields/subfiles, etc). can this be easily accomplished?
(I did see how I can launch a new window(or browser tab) with a PDF, but am looking for a way to open it "IN" my screen).

Thanks

Re: PDFs embeded?

Posted: Wed Jun 22, 2011 11:56 am
by David
You could try sticking an HTML container widget inside the tab panel.

This has an "html" property that you can use to put custom HTML onto the screen. You can use an HTML <embed> element to put a PDF document "in" the page.

You could try setting the "html" property to something like this:

Code: Select all


<embed src="/mydir/mydoc.pdf" />


Re: PDFs embeded?

Posted: Thu Jun 23, 2011 1:27 pm
by David
Also, you'd probably want to stretch the <embed> element to 100% size of the container. As in:

Code: Select all


<embed src="/mydir/mydoc.pdf" style="width: 100%; height: 100%;" />

This will match it to the size of the HTML Container widget, so that you can resize the whole thing in the designer very easily.