on 03-20-2013 7:18 PM
Hi,
I have a hyperlink to a PDF in one of my HTMLviews in my workflow screen. When I touch on this link (in iPad/iPhone), the HWC loads and render the PDF beautifully in its content pane. Now the issue is that I do not have a way to go back to the previous page. There is no back/cancel button. So practically this functionality is useless. Is there any way I could load the PDF in a new window? The target attribute of the A tag or the javascript window.open etc do not work in HWC. And none of the jquery mobile popups that I tried worked(most of the sample available on the Net requires a later version of jquerymobile than the 1.0 used in HWC. Please suggest a solution.
Thanks.
If the pdf file is simply included in the hybrid app package at say html/my.pdf, you could add a button called show_PDF and then in Custom.js add the following code.
customBeforeMenuItemClick {
if (menuItem === "show_PDF") {
showLocalAttachment("html/my.pdf");
return false;
}
}
If instead the contents of the PDF are coming as part of the workflow message from the SUP server then you could use the attachment viewer control.
Hope that helps,
Dan van Leeuwen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have a look at the attachment viewer control in the tool palette. If you add that control onto your screen and look at its properties, you can specify an object query that will return the binary content that is your PDF. In addition it requires either the name of the file (including extension) or the mime type so that the attachment viewer know what kind of content it is attempting to display.
You could try taking a look at the section
Using the PhoneGap API to Take a Smaller Picture in PhoneGap and Hybrid Web Container Customization Sample for 2.1 ESD #3 https://cw.sdn.sap.com/cw/docs/DOC-149428
That currently demonstrates how display an image retrieved from the SUP server and how to update that image. It shows the picture in an image control but you could change it to use the attachment viewer control instead.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.