Fork me on GitHub

pdf class not working in 1.1.2  Bottom

  • 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?
  • I figured it out. I was using a deprecated function call. sorry for the trouble...
  • Nope. That wasn't it!! Any ideas out there??
  • 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?
  • 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.
  • 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.
  • 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.

This list is based on users active over the last 60 minutes.