I have upgraded to Zikula 1.1.2 and now a class I was using for a module in PN 764 for displaying a pdf file with annotations created by the module is no longer working. It says it is a pdf object but nothing gets generated on the page.
Could this be some security issue with 1.1.2 that I am unaware of or something else?
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- rgasch created topic »Using PageUtil::addVar() to load script code« 11:48 AM
- michiel responded to »password problem« 10:01 AM
- mazdev responded to »Hide "Register new account" and change template to 3 col« 07:50 AM
- mesteele101 created topic »Zikula 1.3.3 - Site Search 1.5.2 - Unable to turn off plug-ins« 07:48 AM
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 25. May
- mazdev responded to »Pages 2.5.0 and updating - Page not found« 25. May
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 25. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
pdf class not working in 1.1.2
-
- Rank: Softmore
- Registered: Nov 30, 2005
- Last visit: May 07, 2010
- Posts: 104
-
- Rank: Softmore
- Registered: Nov 30, 2005
- Last visit: May 07, 2010
- Posts: 104
I figured it out. I was using a deprecated function call. sorry for the trouble... -
- Rank: Softmore
- Registered: Nov 30, 2005
- Last visit: May 07, 2010
- Posts: 104
-
- Rank: Developer
- Registered: Jun 16, 2003
- Last visit: May 29, 2010
- Posts: 1966
you aren't giving enough information for anyone to help you. 'a class' and 'a module' don't tell us anything that can help. what module? what class? do you have a URL? can you provide more information? -
- Rank: Softmore
- Registered: Nov 30, 2005
- Last visit: May 07, 2010
- Posts: 104
Sorry.
The class is from a download fpdf153... and the module is one I have created on a website for registered users only. This is my code:
Code
function MyDogs_forms_print_AKC($args)
{
$vid = $args['vid'];
$eid = $args['eid'];
$dogtag = $args['dogtag'];
$venu = $args['venu'];
$item = $args['item'];
$titleName = $args['titleName'];
$filename = $args['filename'];
$reg = pnModAPIFunc('MyDogs',
'user',
'getReg',
array('dogtag' => $dogtag,
'vid' => $vid));
// a bunch more code...
// then the call to the fpdf class
if (file_exists($filename)) {
// initiate FPDI
//$pdf =& new FPDI('L','in','Letter');
$pdf =& new PDFI('L','pt','Letter');
$pdf->SetAutoPageBreak(0, 0);
// add a page
$pdf->AddPage();
// set the sourcefile
//$pdf->setSourceFile('PDFDocument.pdf');
$pdf->setSourceFile($filename);
// import page 1
$tplIdx = $pdf->importPage(1);
//$pdf->useTemplate($tplIdx, 0, 0, 11, 8.5);
$pdf->useTemplate($tplIdx, 0, 0, 792, 612);
$pdf->Image("modules/MyDogs/pnimages/logoPrintedBy.jpg", 309, 5, 105, 36);
$pdf->SetFont('Arial');
$pdf->SetFontSize(10);
$pdf->SetTextColor(0,0,255);
$pdf->SetDrawColor(0,0,255);
// some more code to draw circles and stuff...
// then close it out...
// output the image
$pdf->Output();
}
This works fine under 764 but since upgrading to 1.1.2 it no longer works. -
- Rank: Softmore
- Registered: Nov 30, 2005
- Last visit: May 07, 2010
- Posts: 104
The website is http://agilityjot.com you can login as demo with password password. Then go to this link http://agilityjot.co…unc=view&dogtag=349 And if you click on the printer icon with the 'E' on top of it... this is supposed to generate a pdf.
You can see the 764 version of this website here http://ajot.mjtent.com login as above and then go to this link http://ajot.mjtent.c…dogtag=297&eid=1992 then click on printer icon with the 'E' on top and you will see what it is supposed to do. -
- Rank: Softmore
- Registered: Nov 30, 2005
- Last visit: May 07, 2010
- Posts: 104
Not sure why this is necessary for Zikula but I saw a comments in the fpdf documentation that no extra line can be added after the Output call. So I added an exit; command after the Output call and that did it!
Thanks to anyone that spent any time looking into this for me... hopefully this will help anyone else who is using this pdf class.
- Moderated by:
- Support
