# How to convert PDF to PCL from PHP code?

When you need to convert PDF to PCL from PHP code, the following article will be helpful for you. VeryDOC PDF to Vector Converter can be used to convert PDF to PCL and other vector file formats like EMF, WMF, SVG, Postscript (PS), EPS, SWF (Flash), XPS, HPGL, PCL etc. This software is command line version, and there is also SDK version of this software available, no matter which version you use, you can convert PDF to PCL from PHP code easily. If you use the SDK version, there will be code templates of calling this software from Visual Basic, C/C++, Delphi, ASP, PHP, C#, .NET, etc. Please check more related information on homepage, in the following part, let us check how to use this software.

• Here I will take the command line version for examples.  There are two license types of this software: Server License and Developer License. By the server version, you can call this software from the whole server. By the developer version, you can develop new software based on this software and then redistribute it.
• When downloading finishes, there will be zip file. Please extract it to some folder then you can check executable file, code templates, help documents and other files.

Step 2. Convert PDF to PCL from PHP code.

• SDK version covers all the functions of command line version, for showing functions of converting PDF to PCL more easily, here I will show some parameters and command line examples.
Support output formats: HPGL—> HP-GL plotter language and PCL—> HP Page Control Language, Printer Command Language Format (PCL)
pdf2vec.exe C:\in.pdf C:\out.hpgl
pdf2vec.exe C:\in.pdf C:\out.plt
pdf2vec.exe C:\in.pdf C:\out.pcl
pdf2vec.exe -scale 50 C:\in.pdf C:\out.pcl
pdf2vec.exe -color 1 C:\in.pdf C:\out.pcl
Parameters:-scale <int> : specify the factor by which the printed output is to be scaled, The apparent page size is scaled from the physical page size by a factor of scale/100.this option is available for PCL, HPGL, XPS, PS and EPS formats.
-color <int>     : specify color or monochrome to printer,  this option is available for PCL, HPGL, PS, EPS formats . 1 : monochrome.  2 : color

• Now let us check how to call this conversion from PDF to PCL  by PHP code.
• <?php
$exeshell =new COM("exeshell.shell") or die("Can't start exeshell");$exeshell->RunCommandLine("UserName", "Password", ' "C:\pdf2vec.exe" "C:\test.pdf" "C:\out.pcl" ');
\$exeshell = null;
?>

As there are two many functions of this software, I can not list all of them here. During the using, if you have any question, please contact us as soon as possible.

VN:F [1.9.20_1166]