Loading ...
Sorry, an error occurred while loading the content.

Hi

Expand Messages
  • piyu_saanjh
    Hey all.... I am trying to work on html to pdf conversion using php for which I am using mPDF freeware. Everything is working fine now the problem I am facing
    Message 1 of 7 , Mar 2, 2010
    • 0 Attachment
      Hey all....
      I am trying to work on html to pdf conversion using php for which I am using mPDF freeware.
      Everything is working fine now the problem I am facing is
      I need to integrate two graphs on one page or two different pages in the same pdf.
      I need to work on this urgently. Please help
      My code is
      <?php
      include("mpdf.php");
      ini_set("memory_limit","64M");
      $html = "http://gohad.info/S/pdfconv/fam2.html";
      $buffer = file_get_contents($html);
      $mpdf=new mPDF();
      $mpdf->AddPage();
      $mpdf->debug = true;
      $mpdf->useOnlyCoreFonts = true;
      $mpdf->Image('images/red.png',0,0,210,297,'png','',true);
      $mpdf->SetDisplayMode('fullpage');
      $mpdf->SetFontSize(6);
      $mpdf->WriteHTML($buffer);
      $mpdf->Output('fam2.pdf', 'F');
      echo "PDF Created";
      echo "<meta http-equiv='refresh' content='0;url=http://gohad.info/S/pdfconv/fam2.pdf'>";
      ?>
    • munim2020
      Sounds simple enough.. Have you worked with php before? Anyway, one way you can do this.. Instead of getting the entire pages HTML content, you can just
      Message 2 of 7 , Mar 2, 2010
      • 0 Attachment
        Sounds simple enough.. Have you worked with php before?
        Anyway, one way you can do this.. Instead of getting the entire pages HTML
        content, you can just extract the graph code for the two pages and
        concatenate them into a single buffer.

        On 3 March 2010 12:50, piyu_saanjh <kudalepooja@...> wrote:

        >
        >
        > Hey all....
        > I am trying to work on html to pdf conversion using php for which I am
        > using mPDF freeware.
        > Everything is working fine now the problem I am facing is
        > I need to integrate two graphs on one page or two different pages in the
        > same pdf.
        > I need to work on this urgently. Please help
        > My code is
        > <?php
        > include("mpdf.php");
        > ini_set("memory_limit","64M");
        > $html = "http://gohad.info/S/pdfconv/fam2.html";
        > $buffer = file_get_contents($html);
        > $mpdf=new mPDF();
        > $mpdf->AddPage();
        > $mpdf->debug = true;
        > $mpdf->useOnlyCoreFonts = true;
        > $mpdf->Image('images/red.png',0,0,210,297,'png','',true);
        > $mpdf->SetDisplayMode('fullpage');
        > $mpdf->SetFontSize(6);
        > $mpdf->WriteHTML($buffer);
        > $mpdf->Output('fam2.pdf', 'F');
        > echo "PDF Created";
        > echo "<meta http-equiv='refresh' content='0;url=
        > http://gohad.info/S/pdfconv/fam2.pdf'>";
        > ?>
        >
        >
        >



        --
        Abdul Munim Kazia
        mail@...


        [Non-text portions of this message have been removed]
      • pooja kudale
        Hey, Could you please elaborate. I am a newbie to php and haven done much of in depth coding. I am working on this proj and need to give results soon. suppose
        Message 3 of 7 , Mar 2, 2010
        • 0 Attachment
          Hey,

          Could you please elaborate. I am a newbie to php and haven done much
          of in depth coding. I am working on this proj and need to give results soon.
          suppose have two html files
          fam1.html and fam2.html
          each giving two different output charts
          now if i include one its working. But how do I include both of them in one
          pdf same page and also on different pages.
          Please Help.

          Regards,
          Pooja.


          [Non-text portions of this message have been removed]
        • munim2020
          Give this a shot. What am I doing here is just adding the HTML code from two different pages. Chances are this class may not accept 2 HTML markups just added
          Message 4 of 7 , Mar 3, 2010
          • 0 Attachment
            Give this a shot. What am I doing here is just adding the HTML code from two
            different pages. Chances are this class may not accept 2 HTML markups just
            added together, but its worth a shot.
            Let me know how it goes.
            <?php
            include("mpdf.php");
            ini_set("memory_limit","64M");
            $html1 = "http://gohad.info/S/pdfconv/fam2.html";
            $html2 = "http://http://gohad.info/S/pdfconv/fam3.html";<http://gohad.info/S/pdfconv/fam2.html>
            $b1 = file_get_contents($html);
            $b2 = file_get_contents($html2);
            $buffer = $b1.$b2;
            $mpdf=new mPDF();
            $mpdf->AddPage();
            $mpdf->debug = true;
            $mpdf->useOnlyCoreFonts = true;
            $mpdf->Image('images/red.png',

            0,0,210,297,'png','',true);
            $mpdf->SetDisplayMode('fullpage');
            $mpdf->SetFontSize(6);
            $mpdf->WriteHTML($buffer);
            $mpdf->Output('fam2.pdf', 'F');
            echo "PDF Created";
            echo "<meta http-equiv='refresh' content='0;url=
            http://gohad.info/S/pdfconv/fam2.pdf'>";
            ?>


            On 3 March 2010 13:22, pooja kudale <kudalepooja@...> wrote:

            >
            >
            > Hey,
            >
            > Could you please elaborate. I am a newbie to php and haven done much
            > of in depth coding. I am working on this proj and need to give results
            > soon.
            > suppose have two html files
            > fam1.html and fam2.html
            > each giving two different output charts
            > now if i include one its working. But how do I include both of them in one
            > pdf same page and also on different pages.
            > Please Help.
            >
            > Regards,
            > Pooja.
            >
            > [Non-text portions of this message have been removed]
            >
            >
            >



            --
            Abdul Munim Kazia
            mail@...


            [Non-text portions of this message have been removed]
          • pooja kudale
            hey, m getting this error *Parse error*: syntax error, unexpected
            Message 5 of 7 , Mar 3, 2010
            • 0 Attachment
              hey,

              m getting this error
              *Parse error*: syntax error, unexpected '<' in *
              /hermes/bosweb/web147/b1479/d5.lciin000/public_html/
              gohad.info/S/pdfconv/testing.php* on line *5*


              >
              >


              [Non-text portions of this message have been removed]
            • pooja kudale
              Hey, Still only the pdf of fam2 is being created pls check this link to understand the problem m facing http://gohad.info/S/pdfconv/testing.php [Non-text
              Message 6 of 7 , Mar 3, 2010
              • 0 Attachment
                Hey,

                Still only the pdf of fam2 is being created
                pls check this link to understand the problem m facing

                http://gohad.info/S/pdfconv/testing.php


                [Non-text portions of this message have been removed]
              • pooja kudale
                Please check the same link now...the pdf of only one html file is being created. the other graph is not being shown [Non-text portions of this message have
                Message 7 of 7 , Mar 3, 2010
                • 0 Attachment
                  Please check the same link now...the pdf of only one html file is being
                  created. the other graph is not being shown


                  [Non-text portions of this message have been removed]
                Your message has been successfully submitted and would be delivered to recipients shortly.