Does anyone know how to embed an uploaded PDF on a page?
I know the download URL given by {{=URL('download',args=row.field_name)}},
but this URL does not seem to work for embedding.
For example, the URL does not work for PDFObject:
<script type='text/javascript'>
function embedPDF(){
var myPDF = new PDFObject({
url: {{=URL('download',args=row.field_name)}}
}).embed();
}
window.onload = embedPDF;
</script>
It also doesn't work for other methods such as Google embed, iframe, etc.
Anyone knows how to get around this? Thanks.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.