Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to convert PDF version 1.5 to version 1.4 in PHP

How to convert PDF version 1.5 to version 1.4 in PHP ? Can anyone point me in the right direction ?

like image 978
shaikh Avatar asked Jun 13 '12 14:06

shaikh


1 Answers

I have a similar requirement, and found that Ghostscript can modify a PDF version. Documentation is here: http://ghostscript.com/doc/current/Use.htm

However, I didn't find anything specific about the dCompatibilityLevel option in the documentation. Rather, I found this article that demonstrated its use: http://rohieb.wordpress.com/2012/06/09/use-ghostscript-to-convert-pdf-files/

Here is the command:

gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dNOPAUSE -dQUIET -dBATCH 
  -sOutputFile=new-pdf1.5.pdf original.pdf
like image 112
JuliaK Avatar answered Oct 19 '22 02:10

JuliaK