1

I am testing phpexcel and need to save the file as a pdf, however I receive the following error:

TCPDF ERROR: [Image] Unable to get image: zip://pcash.xlsx#xl/media/image3.emf

$objWriter = PHPExcel_IOFactory::createWriter($excel2, 'PDF');
$objWriter->save('pcash1.pdf');

I have seen this thread, but don't really understand why the built in PDF writer apparently cannot create PDFs ??

PHPExcel create/style/save PDF Documentation

Is it not possible to save a file as pdf and if not why not as that appears to be a built in feature ??

Community
  • 1
  • 1
crankshaft
  • 2,607
  • 4
  • 45
  • 77
  • If you look at the latest code in github develop branch, it allows a choice of PDF renderer (tcPDF, mPDF or DomPDF)... you could check if any of the other rendering engines would work with this file – Mark Baker Oct 01 '12 at 13:49

1 Answers1

3

Checking the documentation for the tcPDF library, EMF format images are supported via the ImageMagick extension (if the extension is loaded in PHP) and on a Windows platform (apparently ImageMagick only supports EMF on Windows platforms).

Mark Baker
  • 209,507
  • 32
  • 346
  • 385