Remove PDF Support

Topics: Developer Forum, User Forum
Feb 8, 2011 at 4:27 AM

Hi all,

How to remove pdf support / Related files.

Basically i believe i will be able to free 19mb file size of phpexcel folder as i wont be using anything other than excel2007 / excel 2003.

So can i directly remove pdf folder, would there be any issue (Also in licence)


Feb 8, 2011 at 8:39 AM

You can remove the entirety of the /Classes/PHPExcel/Shared/PDF folder and it won't cause any problems.... as long as you don't try writing to PDF. There are no licencing issues with doing this, and it frees a lot of disk space (if this is critical).

If you wanted to really clean everything up, you could also delete /Classes/PHPExcel/Writer/PDF.php as well. There are PDF references in /Classes/PHPExcel/Writer/HTML.php, but you shouldn't need to worry about these.


I've been polling for whether we should retain tcPDF as part of the PHPExcel distribution, or simply provide a set of wrappers to the more popular PDF writer classes (allowing developers to install their preferred PDF writer library independently and simply configure PHPExcel to work with that)... but so far I have had absolutely no feedback at all.

Feb 8, 2011 at 9:14 AM

Thanks MarkBaker,

One of the reasons i m not using pdf part of PHPExcel is poor display (looks very odd).

I had worked with DOMPdf very simple for html to PDF conversion but it is not a good as reporting tool (huge data) like excel.

I m thinking to learn FPDF the core library used by mPDF & DOMPDF and use it for my future reporting tool basically inspired by crystal reports of dot net. PHP world does not have anything similar.

One of my client wants that he clicks the print button it should automatically print the report without even showing report (in any format, HTML / EXCEL or PDF nothing straight to the printer), which i believe is not possible with current browsers.


Feb 22, 2011 at 12:52 PM

I was going to use PHPExcel as a reporting tool adn then, since it's PDF conversions were crappy, wrote an entire TCPDF descendant class to build my reports in a spreadsheet fashion.