[Webkit-unassigned] [Bug 102186] New: QWebkitPluginFactory should support accessing the inline PDF data
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Nov 13 23:59:22 PST 2012
https://bugs.webkit.org/show_bug.cgi?id=102186
Summary: QWebkitPluginFactory should support accessing the
inline PDF data
Product: WebKit
Version: 528+ (Nightly build)
Platform: All
OS/Version: All
Status: UNCONFIRMED
Severity: Enhancement
Priority: P3
Component: WebKit Qt
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: tarja.sundqvist at digia.com
The attached example application implements a custom webkit plugin which downloads a PDF file to a local file.
Web page that is opened, e.g. pdf_test.html:
{code}
<HTML>
<BODY>
<p>Pdf tester<P>
<iframe width="100%" height="90%" src="generate_pdf.php"/>
</BODY>
</HTML>
{code}
pdf_test.html refers to "generate_pdf.php" via an iframe.
Content of generate_pdf.php:
{code}
<HTML>
<BODY onload="javascript:document.mainform.submit()">
<p>Generating Form<P>
<FORM name="mainform" action="view_pdf.php" METHOD=POST>
<input type="hidden" name="name" value="test.pdf" />
</FORM>
</BODY>
</HTML>
{code}
generate_pdf.php calls view_pdf.php via a POST form (with the pdf name as post data).
Content of view_pdf.php:
{code}
<?php
if($_POST["name"] != '')
{
// Simple check to make sure noone is doing anything wrong (given this is a public facing page)
if($_POST["name"] != 'test.pdf')
{
echo 'Please do not poison my $_POST variables!';
die;
}
header('Content-type: application/pdf');
header('Content-Disposition: inline; filename="' + $_POST["name"] + '"');
readfile($_POST["name"]);
}
?>
{code}
--> Feature suggestion: custom plugin should 1) know that the data is inline and 2) get access to that downloaded data.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list