Php Zend PDF-获取图像的宽度和高度?

Php Zend PDF-获取图像的宽度和高度?,php,pdf-generation,zend-pdf,Php,Pdf Generation,Zend Pdf,我正在创建这样的形象: $image1 = Zend_Pdf_Image::imageWithPath($path); 现在,当我调试时,我看到了宽度和高度,但我无法使用 $image1->_width; 因为它受到保护。如何获得这些值 谢谢 试试看 $image1->getPixelWidth(); $image1->getPixelHeight(); 试一试

我正在创建这样的形象:

$image1 = Zend_Pdf_Image::imageWithPath($path);
现在,当我调试时,我看到了宽度和高度,但我无法使用

$image1->_width;
因为它受到保护。如何获得这些值

谢谢

试试看

$image1->getPixelWidth();
$image1->getPixelHeight();
试一试