pdf to vector converter

How to convert PDF to Postscript and EPS from C#?

   For converting PDF to Postscript and EPS from C#, maybe you can refer to the following article. Here I will introduce one software named VeryDOC PDF to Vector Converter, by which we can convert PDF to various vector image formats like EMF, WMF, SVG, Postscript (PS), EPS, SWF (Flash), XPS, HPGL, PCL etc. During the conversion, this software allows you to choose conversion page range, specify color or monochrome to printer, specify the factor by which the printed output is to be scaled and others. Please check more detail information of this software on homepage, in the following part, let us check how to use this software.

Step 1. Download a copy of PDF to Vector Converter SDK Developer License

  • Under one Developer License, you can integrate the corresponding SOFTWARE into your developed software and redistribute it with royalty-free. If the SOFTWARE contains source codes, you have the right to modify and reuse the codes under the Developer License.
  • When downloading finishes, there will be a zip file. Please extract it to some folder then you can find related  elements and help documents.

Step 2. Convert PDF to PS or EPS (Adobe Encapsulated PostScript) from C#

  • When you use this software, please obey rules of this software and follow example, code templates.
  • Here are some parameters for converting PDF to PS, maybe you can have a check.
  • -firstpage <int> : first page to print, from 1 to max page
    -lastpage <int>  : last page to print, from 1 to max page
    -psmode <int> : convert PDF file to vector Postscript file
    -psmode 0: convert PDF to Postscript via printer driver
    -psmode 1: convert PDF to Postscript via local interpreter 1
      -psmode 2: convert PDF to Postscript via local interpreter 2
       default is "-psmode 0"

  • When you call this software of converting PDF to PS from C#, please refer to the following code template.
  • Make use of the PROCESS class available in SYSTEM.DIOGNOSTICS namaspace, use the following piece of code to execute the pdf2vec.exe file,
    ~~~~~~~~~~~~~~~~~
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Diagnostics;

    namespace ConsoleApplication1
    {
        class Program
    {
    static void Main(string[] args)
    {
    Process proc = new Process();
    proc.StartInfo.FileName = @"C:\\pdf2vec.exe";
    string strArguments = "";
    strArguments += "-psmode 0”;
    strArguments += " D:\\temp\\sample.pdf D:\\temp\\out.ps";
    Console.WriteLine(strArguments);
    proc.StartInfo.Arguments = @strArguments;
    proc.Start();
    proc.WaitForExit();
    }
    }
    }
    ~~~~~~~~~~~~~~~~~

Please check more example on homepage. During the using, if you have any question, please contact us as soon as possible.

VN:F [1.9.20_1166]
Rating: 10.0/10 (1 vote cast)
VN:F [1.9.20_1166]
Rating: -1 (from 1 vote)
pdf to vector converter

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.

Step 1. Free trial software PDF to Vector Converter SDK Server License

  • 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]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)
pdf to vector converter

How to convert PDF to vector image inside a special user account from ASP code?

In this article, I will show you how to convert PDF to vector image switch between users from ASP code. This method is good when you need to run the conversion from PDF to vector on sever or public computer which has many different users with different accounts.  The vector image could be MF, WMF, SVG, Postscript (PS), EPS, SWF(Flash), XPS, HPGL, PCL etc. The software I use is named as VeryDOC PDF to Vector Converter, which is command line version software, it is quite helpful for developers. Please check more related information on homepage. In the following part, let us check how to use this software.

Step 1. Free download PDF to Vector Converter SDK Server License

  • If you do not need to use this software for developing, please simply use the command line version which also can satisfy your needs.
  • By the SDK server version, you can call this software from from ASP/PHP/C#/.NET/... etc. server side applications. And SDK version will be much more easier for those developers who need to develop software based on this software.
  • When downloading finishes, there will be a zip file. Please extract to some folder then you can check more related elements and information.

Step 2. Convert PDF to vector inside a special user from ASP code.

  • When you use this software, please refer to the code template, usage and help documents.
  • Here is one code template of converting PDF to flash inside a special user from ASP code. Simply change the output file formats and related parameters then you can run the conversion from PDF to vector image casually.
  • Please by following steps to call pdf2vec.exe inside a special user account,
    1. Please download and install EXEShell COM Library (freeware) from following URL first,
    https://www.verydoc.com/exeshell.html
    https://www.verydoc.com/download/exeshell.zip
    2. Please use following ASP code to run the conversion inside a special user account,
    ~~~~~~~~~~~~~~~~~
    <%
        Set comEXEShell = Server.CreateObject("exeshell.shell")
        RootPath = Server.MapPath(".") & "\"
        EXEFile = RootPath & "pdf2vec\pdf2vec.exe"
        PDFFile = RootPath & "test.pdf"
        SWFFile = RootPath & "out.swf"
        strCommandLine = EXEFile & " " & PDFFile & " " & SWFFile
        response.write strCommandLine & "<br>"
        comEXEShell.RunCommandLine "UserName", "Password", strCommandLine
        Set comEXEShell = Nothing
    %>
    ~~~~~~~~~~~~~~~~~
    Remark:
    You may encounter Error 1314 in some Windows systems when you switch between user accounts, this is caused by permission setting, please refer to the steps in #2 to solve the 1314 Error.

Please check more related code templates and parameters in help document. During the using, if you have any question, please contact us as soon as possible.

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)
pdf to vector converter

How to convert PDF to flash from C#?

    In this article, I will show you how to convert PDF to Flash by C#. The software I use is named as VeryDOC PDF to Vector Converter, by which you can also convert PDF file to EMF, WMF, SVG, Postscript (PS), EPS, SWF (Flash), XPS, HPGL, PCL etc. from C# code. By the developer version of PDF to Vector Converter SDK, you can also run the conversion from Visual Basic, C/C++, Delphi, ASP, PHP, C#, .NET, etc.  Please check more detail information of this software on homepage, in the following part, let us check how to use this software.

Step 1. Free download PDF to Vector Converter SDK Developer License

  • For compressing easily, we have compressed this software package to zip file. When downloading finishes, please extract the zip file to some folder then you can use this software normally.
  • There are executable file, code templates, help document and other files. Please run the conversion according to the example.

Step 2. Convert PDF to Flash by C#.

  • Here are some code of convert PDF to Flash by C#, please have a check. Make use of the PROCESS class available in SYSTEM.DIOGNOSTICS namaspace, use the following piece of code to execute the pdf2vec.exe file,
    ~~~~~~~~~~~~~~~~~
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Diagnostics;

namespace ConsoleApplication1
{
    class Program
{
static void Main(string[] args)
{
Process proc = new Process();
proc.StartInfo.FileName = @"C:\\pdf2vec.exe";
string strArguments = "";
strArguments += "-swfburst";
strArguments += " D:\\temp\\sample.pdf D:\\temp\\out.swf";
Console.WriteLine(strArguments);
proc.StartInfo.Arguments = @strArguments;
proc.Start();
proc.WaitForExit();
}
}
}
~~~~~~~~~~~~~~~~~
Sample code #2 (C# example),
Please by following steps to call pdf2vec.exe inside a special user account,
1. Please download and install EXEShell COM Library (freeware) from following URL first,
https://www.verydoc.com/exeshell.html
https://www.verydoc.com/download/exeshell.zip
2. Please use following C# code to run the conversion inside a special user account,
~~~~~~~~~~~~~~~~~
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
    class Program
{
static void Main(string[] args)
{
System.Type otype = System.Type.GetTypeFromProgID("exeshell.shell");
Object o = System.Activator.CreateInstance(otype);
otype.InvokeMember("RunCommandLine", System.Reflection.BindingFlags.InvokeMethod, null, o,
new object[] { "UserName", "Password", @"C:\pdf2vec.exe ""C:\test.pdf"" ""C:\out.swf""" });
otype = null;
}
}
}
~~~~~~~~~~~~~~~~~
Remark:
You may encounter Error 1314 in some Windows systems when you switch between user accounts, this is caused by permission setting, please by following steps to solve this 1314 Error,
ERROR 1314:
~~~~~~~~~~~~~
1314 A required privilege is not held by the client. ERROR_PRIVILEGE_NOT_HELD
~~~~~~~~~~~~~
To resolve this issue:
1. Click Start, click Run, type "secpol.msc", and then press ENTER.
2. Double-click "Local Policies".
3. Double-click "User Rights Assignment".
4. Double-click "Replace a process level token".
5. Click "Add", and then double-click the "Everyone" group
6. Click "OK".
7. You may have to logout or even reboot to have this change take effect.

Please check more code templates in help document. During the using, if you have any question, please contact us as soon as possible.

VN:F [1.9.20_1166]
Rating: 10.0/10 (1 vote cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)
pdf to vector converter

-scale option is not work in PDF to Vector Converter SDK

I am trying to use -scale feature from pdf2vec tool when converting to PostScript, but it does not appear to have any effect: same .ps file is produced with out without -scale option. I have tried command line tool, as well as SDK (.DLL). Is there some special syntax required for this option beyond what is on page:

https://www.verydoc.com/pdf-to-vector.html

Customer
----------------------------
Thanks for your message, you can run following command lines to convert your PDF file to PS files with different "scale" option, the output PS files are not same,

pdf2vec.exe -scale 50 -psmode 0 E:\test.pdf E:\test1.ps
pdf2vec.exe -scale 80 -psmode 0 E:\test.pdf E:\test2.ps

VeryDOC
----------------------------
Thank you very much for the quick response.

I have tested with suggested option, and that worked differently, but with issues, so this is not resolved yet.

1) the file produced with "-scale" option "huge". From 100 KB PDF, the .PS is 41 MB (!!). A non-scale converted .PS file is about 200 KB.

2) When printed, the .PS file is still not doing scaling image, so there is not visible difference. I have tested with 2 different types of printers, with different internal postscript engines, no scaling on any of them.

3) I have observed that the conversion is now done by using a print driver with specific name. To see if the issue of print file size could be resolved, I rename another "print to file" postscript driver to required name, and then the conversion produced expected reasonable postscript size (200KB), but still not resizing/scaling when printed.

I have tested printing directly from PDF reader program, and with "scale" option in the driver it does print resizes. So there is possibly some limitation in the way the PDF2Vec is using "scale" option in the driver.

Attached is a sample PDF file that I was using for testing. This is a file from a third-party customer, so while there is no confidential info in the file, please do not share it with others.

Customer
----------------------------
>>1) the file produced with "-scale" option "huge". From 100 KB PDF, the .PS
is 41 MB (!!). A non-scale converted .PS file is about 200 KB.

This is normal, because "-scale 50 -psmode 0" option will embed all necessary fonts into PS file, these fonts' data will increase PS file size a lot. If you don't want to embed the fonts, you may run following command line directly,

pdf2vec.exe D:\test.pdf D:\out.ps

this command line will create a small PS file from PDF file.

Do you want print the PDF file with "scale" option? if yes, we suggest you may download PDFPrint Command Line product from our website to try,

http://www.verypdf.com/pdfprint/pdfprint_cmd.zip

PDFPrint Command Line product has more options to scale the PDF pages to fit the target printer's paper size, for example,

pdfprint.exe -scale 50 -printer "Microsoft XPS Document Writer" D:\test.pdf

pdfprint.exe -scalex 50 -scaley 50 -printer "Microsoft XPS Document Writer" D:\test.pdf

pdfprint.exe -scalex 50 -scaley 50 -raster2 -printer "Microsoft XPS Document Writer" D:\test.pdf

Can you scale the PDF file and print to your printer correctly with PDFPrint Command Line application?

VeryDOC

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)