cancel
Showing results for 
Search instead for 
Did you mean: 

PDF in IFrame

Former Member
0 Kudos

Hello,

i have created a WD with a iFrame UI. My purpose is to show only the first site of my pdf-document without the functions for scrolling, saving etc.. Is there any way to do this? Until now i used the code below to display the pdf.

regards,

Sharam


	String pdfUrl = null;
	try
	{
		pdfUrl =
			WDWebResource
				.getWebResource(wdComponentAPI.getDeployableObjectPart(), WDWebResourceType.PDF, "p1.pdf")
				.getURL();
	}
	catch (Exception e)
	{
		IWDMessageManager manager = wdComponentAPI.getMessageManager();
		manager.reportException("could not get WebResourceURL" + e.getMessage(), false);
	}
    
	wdContext.currentContextElement().setPdfUrl(pdfUrl);  

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member182374
Active Contributor
0 Kudos

Hi Sharam Pourmir,

Try to put the pdf file under your <project name>/src/mimes/Components/<component name>

In the IFrame just write the file's name in the 'src' property (name & extension are case sensitive).

It should work.

Omri

Former Member
0 Kudos

Hi Omri,

i have no problem to show the PDF, but i want only to show the first site of the document like a thumbnail.

regards,

sharam