I can't send a SESSION value to the page with the HTML for the PDF. I get a value for the "Entered value" parameter but not for the "Session variable". Please let me know what I have done wrong.
I have added my code for the two pages below:
Page 1 - the DwZone plugin page -------------------------------------------------------------- <?php ob_start(); ?> <?php @session_start(); ?> <?php $_SESSION['login_artist_id'] = 7; /*echo ('session value = '.$_SESSION['login_artist_id']); exit;*/ ?> <?php //error_reporting(E_ALL); ?> <?php //*********************** //* Php HTML to PDF //*********************** require_once("../../dwzHtmlPdf/dwzPdfClass.php"); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Inventory List PDF</title> </head> <body> <?php //*********************** //* http://www.DwZone-it.com //* Php HTML to PDF //* Version 1.0.14 //*********************** $dwzPdf_1 = new dwzPhpPdf(); $dwzPdf_1->SetPageInstance("1"); $dwzPdf_1->Init(); $dwzPdf_1->SetDestinationFolder("/pdf_documents"); $dwzPdf_1->SetPdfName("BCG_Inventory.pdf"); $dwzPdf_1->SetMainPar("View in browser (no save)@_@@_@Overwrite@_@LETTER@_@@_@@_@0@_@P@_@5@_@5@_@20@_@20@_@#FFFFFF@_@@_@Middle center@_@@_@@_@mm@_@@_@px@_@false@_@5600@_@@_@@_@@_@@_@default@_@SinglePage@_@UseNone@_@@_@false@_@false@_@false@_@false@_@utf-8;utf-8;utf-8@_@false@_@Arial@_@true@_@false@_@false@_@ONLOAD@_@"); $dwzPdf_1->SetSourcePar("Post@_@/admin/export_utilities/test_PDF.php@_@Entered value;makePDF;true;|Session variable;artist_id;login_artist_id;"); $dwzPdf_1->SetHeaderPar("0@_@@_@@_@"); $dwzPdf_1->SetFooterPar("0@_@@_@@_@"); $dwzPdf_1->SetPagePath(__FILE__); $dwzPdf_1->CreatePdf(); //****************** // Php HTML to PDF // End code //****************** ?> </body> </html> ------------------------------------------ My test HTML page ------------------------------------------ <head> <style type="text/css"> p { margin: 0px; padding: 0px; } </style> </head> <body> <p style="text-align: center;">This is test output for DwZone HTML to PDF</p> <p> </p> <p> </p> <p>Post value for artist_id = <?php echo $_POST['artist_id']; ?></p> <p> </p> <p>Post value for makePDF = <?php echo $_POST['makePDF']; ?></p> </body>
|
|
|