cancel
Showing results for 
Search instead for 
Did you mean: 

Read a pdf Document throw Iframe

Former Member
0 Kudos

Hello experts,

I want to implement a view which displays a pdf in a I frame. Based on the location the source of the pdf file is different. For example a user which is based at england should see a differnet pdf like a employee from germany. I think the best way to implement such logik would be to use WDWebResourceType.pdf type. Any ideas how to implement such logic???

Many thanks

Marco

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi i think you can use the following code.

get the user name and location according to the location read the pdf file .

byte[] PDFFormContent =getthe pdf form into byte format.

IWDCachedWebResource PDFFormResource = WDWebResource.getWebResource(pdfContent,WDWebResourceType.PDF);/create a resource in the server using this code./

try

{

//Access the url of that resource

wdContext.currentContextElement.setPdfData(PDFFormResource.getURL());

}

catch(Exception e)

{

wdComponentAPI.getMessageManager().reportException(e.getMessage(),true);

}

Build and run the application.

Thanks and Regards

shanto aloor

Former Member
0 Kudos

Unfortunately I dont't have the pdf documents physicaly. I just have URL - Links.

How do I handle this?

Regards

Marco

Former Member
0 Kudos

hi,

then it is easy i think.....

for the property URL assign a string attribute and assign different pdf url according to the user location

Thanks and Regards

shanto aloor

Answers (0)