Menu

"Failed to load PDF document"

Help
tobbe5
2015-09-25
2015-11-03
  • tobbe5

    tobbe5 - 2015-09-25

    Hello together,

    i have a problem with my generated tcpdf files.

    I generate price lists and data sheets. The price lists can be open on chrome, ie and firefox. The data sheets just can be open in firefox. On chrome i see the error "Failed to load PDF document" and in ie i see the error message "site can not load".

    I checked my complete code and find the row, that made this error:

    $sql_galeriefotos=mysql_query("SELECT * FROM artikel_fotos WHERE artikel_id=$hauptartikel_id LIMIT 18");
    
    $i=0;
    while($rowgaleriefotos=mysql_fetch_array($sql_galeriefotos))
    {
        $i++;
    
        if($i==1)
        {
            $pdf->SetXY(12, 41);
        }
        else if($i==4)
        {
            $pdf->SetXY(12, 81);
        }
        else if($i==7)
        {
            $pdf->SetXY(12, 121);
        }
        else if($i==10)
        {
            $pdf->SetXY(12, 161);
        }
        else if($i==13)
        {
            $pdf->SetXY(12, 201);
        }
        else if($i==16)
        {
            $pdf->SetXY(12, 241);
        }
    
        $foto_pfad=utf8_encode($rowgaleriefotos[foto_pfad]);
        $pdf->Image('http://www.domain.com/'.$foto_pfad, '', '', 60, 40, '', '', 'T', false, 100, '', false, false, 0, false, false, false);
    
    }
    

    This code works on all browsers if i change the "LIMIT" under 9. So if the row looks like this, it will be shown on chrome and ie, too:

    $sql_galeriefotos=mysql_query("SELECT * FROM artikel_fotos WHERE artikel_id=$hauptartikel_id LIMIT 8");
    

    Whats the reason? I must show more pictures in the PDF.

    Is the memory overloaded?

    Is there another problem/error with to much pictures on one page?

    Can anyone help me?

    Thanks!!

     
  • tobbe5

    tobbe5 - 2015-09-28

    Can anyone help me? :(

     
  • tobbe5

    tobbe5 - 2015-09-28

    Can anyone help me? :(

    (Oh duplicate - Please delete! :) )

     

    Last edit: tobbe5 2015-09-28
  • tobbe5

    tobbe5 - 2015-10-05

    Have never anyone had this problem before? :(

     
  • Mikko Salminen

    Mikko Salminen - 2015-10-07

    Hi Tobbe,

    Hard to tell without possibility to try it, but a wild guess is that you send something (like headers, etc) to browser before you let the tcpdf push the pdf-file. And maybe the firefox doesn't mind about double headers / charset broblems and renders the pdf. All in all, this is just a wild guess, but just might be the case.

    • Mikko
     
  • tobbe5

    tobbe5 - 2015-10-22

    Mikko Salminen don't write back via private message.

    Can anyone look at the script and the output site, if i send you the data via mail/pm?

    Thanks for any help!

     
  • Larene Spitler

    Larene Spitler - 2015-11-03

    I noticed this in Chrome and I just clicked on the browser refresh.
    Voila! The pdf document appeared.

     

Log in to post a comment.