• Resolved roakin

    (@roakin)


    hi, i’m using wordpress as a kind of shop management system and therefore i’ve developed a custom plugin. now i need to generate some pdf (with ordered products and such stuff) but i don’t know how i can generate pdfs within wordpress. i tried to use fpdf but of course wordpress has already sent some header information and so this fails

    require('../fpdf.php');
    $pdf=new FPDF();
    $pdf->AddPage();
    $pdf->SetFont('Arial','B',16);
    $pdf->Cell(40,10,'Hello World!');
    $pdf->Output();

    another possibility is to build a new file which generates the pdf. but this pdf cannot be linked in my plugin and so i wonder how to query the database. of course i could establish a new database conneciont but i hope there’s a better solution. any hints for me?

    thanks a lot

  • The topic ‘generating pdfs within wordpress’ is closed to new replies.