Menu

Unable to get image width and height

Help
_snake_
2010-05-18
2014-12-05
  • _snake_

    _snake_ - 2010-05-18

    Hi,

    My PHP version is 5.0.3. I am using that pdf library in Drupal module
    "Printer, e-mail and PDF versions" and when I click in the link to generate
    the PDF file, the following error appears:

    TCPDF ERROR: Unable to get image width and height: http://192.168.123.21/site
    s/all/themes/ovia/logo.png

    Any Idea?

    Thanks

     
  • Nicola Asuni

    Nicola Asuni - 2010-05-18

    This means that the getimagesize() method is unable to get access to the
    requested file.
    You can change this by editing the php.ini and setting the allow_url_fopen
    constant to On.
    Anyway, you can get it working by simply specifying the width and height
    (these are mandatory when using HTML mode).

     
  • Niels Fanře

    Niels Fanře - 2010-05-28

    In the database record containing my image, I've added this:
    <tcpdf method="Image" params="'rn_images/mobile_phone_dm_24.png',0,0,24,24"/>
    -but it still says,
    TCPDF ERROR: Unable to get image width and height:

     
  • Niels Fanře

    Niels Fanře - 2010-05-28

    ...but I guess my problem is that the image name isn't understood.

     
  • Nicola Asuni

    Nicola Asuni - 2010-05-28

    Why you are using the TCPDF tag to insert an image? You can simply add it
    using the html 'img' tag.
    Anyway your syntax is wrong, please upgrade to the latest TCPDF release and
    check the example n. 49.

     
  • Niels Fanře

    Niels Fanře - 2010-05-28

    I wanted to used the tcpdf tag to add the image because the image does not get
    rendered at all. My html looks like this:

    <p>In the <strong>Devices</strong> tab, devices that have been bootstrapped are now shown with a special icon: <img src="rn_images/mobile_phone_dm_24.png">. This makes bootstrapped devices easier to identify.</p>
    

    The image is not output in the PDF (but looks fine in the HTML output). So I
    tried the tcpdf tag... :)

     
  • Nicola Asuni

    Nicola Asuni - 2010-05-29

    Please carefully check the default examples, then try to make one change at
    time until works.

     
  • Thomas Rendleman

    Me also.

     
  • cpw

    cpw - 2014-12-05

    This image is reachable...

    Again as in the other thread: No, it isn't right now.

    BTW: Did you check your allow_url_fopen setting as Nicola suggested?

     

Log in to post a comment.