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)
How to convert PDF to Postscript and EPS from C#?, 10.0 out of 10 based on 1 rating

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *


Verify Code   If you cannot see the CheckCode image,please refresh the page again!