PDF to Vector Converter

PDF to Vector output file naming, how to remove page number from the output filenames?

Dear Support,

We are looking for application for batch converting vector PDF to vector WMF files. Your "PDF to Vector" application seems to be good for this task and we are considering to buy it, however, during testing, I have found one disturbing behavior of your software. Let me explain what we want to achieve: There are an increasing number of PDF files generated by our CAD software. Every such PDF has drawing on page 1 and then description table on page 2. We want to extract Page 1 only and convert it to WMF file for pasting them to technical documentation. I have used loop command in test script in a form:

FOR %%a in (*.pdf) DO e:\pdf2vec\pdf2vec.exe -firstpage 1 -lastpage 1 %%a %%~na.wmf

At first glance, everything works fine, but every output file has changed it's name by adding "001" to it.

Example:

We have input files:

File1.pdf
File2.pdf
File3.pdf
..

And we are expecting

File1.wmf
File2.wmf
File3.wmf
..

Instead of this we got:

File1001.wmf
File2001.wmf
File3001.wmf
..

I have looked for clue in your support page but with no luck.
Yes, we can add part removing "001" from output file names to PDF converting script, but maybe there is option forcing to use exact file name, without adding page number. We have hundreds of PDF files to convert and many of that files have sequence "001" in names already, so adding anything to it's names make a mess.

Kind Regards
Customer
------------------------------------
Please add "-noextname" option to try again,

-noextname : don't append suffix to filename of first page

for example,

FOR %%a in (*.pdf) DO e:\pdf2vec\pdf2vec.exe -noextname -firstpage 1 -lastpage 1 %%a %%~na.wmf

We hope this option will work fine to you, please add it to try again.

VeryDOC

PCL, PS, PDF Page Counter

C# source code example to count color pages in PDF, PS, Postscript, PCL, PRN, SPL, etc. files

Do you have an example on how I can use C# to pass through all of the pages of a pdf file and check each page to determine whether it is color or black and white?

I have a license for Spool File Page Counter SDK.

I found this url,
http://www.verypdf.com/wordpress/201106/counting-the-exact-number-of-pages-in-any-pdf-document-732.html#comments

It appears that I am using the demo version. How do I get the production version?

Customer
----------------------------------------------
Thanks for your message, you may download "Spool File Page Counter SDK" from this web page,

https://www.verydoc.com/spool-page-count.html
https://www.verydoc.com/ps-and-pcl-info-sdk.zip

after you download it, please unzip it to a folder, you will see "C-Sharp" and "C-Sharp-AnyCPU" two folders are included in the ps-and-pcl-info-sdk.zip file, these folders are C# examples, you can compile and run them in "Microsoft Visual Studio" properly.

You can call "ReadInfo.dll" from C# code directly, this is a C# example to call the "ReadInfo.dll" directly,

-----------------------------------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;

namespace ParsingTest {
    class Program {

        [DllImport("ReadInfo.dll", EntryPoint = "ReadInfoFromPCLFile")]
        public static extern Int32 ReadInfoFromPCLFile(
            string fileName,
            Int32 bIsRenderToPDF,
            ref uint bwPageCount,
            ref uint colorPageCount,
            ref uint copyCount,
            ref double pagewidth,
            ref double pageheight,
            StringBuilder paperSizeName);

        [DllImport("ReadInfo.dll", EntryPoint = "ReadInfoSetCode")]
        public static extern void ReadInfoSetCode(string strCode);

        static void Main(string[] args)
        {
            if (args.Length != 1)
            {
                Console.WriteLine("test.exe C:\\test.pcl");
                Console.WriteLine("test.exe C:\\test.ps");
                return;
            }
            Console.Write("args length is ");
            Console.WriteLine(args.Length); // Write array length
            for (int i = 0; i < args.Length; i++) // Loop through array
            {
                string argument = args[i];
                Console.Write("args index ");
                Console.Write(i); // Write index
                Console.Write(" is [");
                Console.Write(argument); // Write string
                Console.WriteLine("]");
            }
            string fileName = args[0];
            int bIsRenderToPDF = 1;
            uint bwPageCount = 0;
            uint colorPageCount = 0;
            uint copyCount = 0;
            double nPageWidth = 0;
            double nPageHeight = 0;
            StringBuilder strPaperSizeName = new StringBuilder(300);

            ReadInfoSetCode("XXXXXXXXXXXXXXXXXX");
            ReadInfoFromPCLFile(fileName, bIsRenderToPDF, ref bwPageCount, ref colorPageCount, ref copyCount, ref nPageWidth, ref nPageHeight, strPaperSizeName);

            Console.WriteLine(String.Format("File: {0}", fileName));
            Console.WriteLine(String.Format("Render To PDF: {0}", bIsRenderToPDF));
            Console.WriteLine(String.Format("BW Pages: {0}", bwPageCount));
            Console.WriteLine(String.Format("Color Pages: {0}", colorPageCount));
            Console.WriteLine(String.Format("Width: {0}", nPageWidth));
            Console.WriteLine(String.Format("Height: {0}", nPageHeight));
            Console.WriteLine(String.Format("Paper name: {0}", strPaperSizeName));
        }
    }
}
-----------------------------------

We are also provide a COM interface (FileInfoCOM.exe) based on ReadInfo.dll library, you can also call FileInfoCOM.exe from C# code instead of ReadInfo.dll library, please by following steps to use FileInfoCOM.exe COM interface,

1. Launch a CMD window by administrator privilege, run following command line to register FileInfoCOM.exe,

FileInfoCOM.exe /regserver

You can also run "install.vbs" to register FileInfoCOM.exe into your system.

2. After you register FileInfoCOM.exe into your system, you can add a reference to FileInfoCOM.exe from your C# code,

-----------------------------------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using FileInfoCOM;

namespace ParsingTest {
    class Program {

        static void Main(string[] args)
        {
            if (args.Length != 1)
            {
                Console.WriteLine("test.exe C:\\test.pcl");
                Console.WriteLine("test.exe C:\\test.ps");
                return;
            }
            Console.Write("args length is ");
            Console.WriteLine(args.Length); // Write array length
            for (int i = 0; i < args.Length; i++) // Loop through array
            {
                string argument = args[i];
                Console.Write("args index ");
                Console.Write(i); // Write index
                Console.Write(" is [");
                Console.Write(argument); // Write string
                Console.WriteLine("]");
            }
            string fileName = args[0];
            int bIsRenderToPDF = 0;
            int bwPageCount = 0;
            int colorPageCount = 0;
            int copyCount = 0;
            double nPageWidth = 0;
            double nPageHeight = 0;
            string strPaperSizeName = new string(' ', 300);

            FileInfoCOM.FileInfoClass objFileInfoCom = new FileInfoCOM.FileInfoClassClass();

            objFileInfoCom.com_ReadInfoSetCode("XXXXXXXXXXXXXXXXXX");
            objFileInfoCom.com_ReadInfoFromPCLFile(fileName, bIsRenderToPDF, ref bwPageCount, ref colorPageCount, ref copyCount, ref nPageWidth, ref nPageHeight, ref strPaperSizeName);

            Console.WriteLine(String.Format("File: {0}", fileName));
            Console.WriteLine(String.Format("Render To PDF: {0}", bIsRenderToPDF));
            Console.WriteLine(String.Format("BW Pages: {0}", bwPageCount));
            Console.WriteLine(String.Format("Color Pages: {0}", colorPageCount));
            Console.WriteLine(String.Format("Width: {0}", nPageWidth));
            Console.WriteLine(String.Format("Height: {0}", nPageHeight));
            Console.WriteLine(String.Format("Paper name: {0}", strPaperSizeName));
        }
    }
}
-----------------------------------

If you encounter any problem, please feel free to let us know, we will assist you asap.

VeryPDF

PDF to Vector Converter

Converting PDF to PCL by PDF to Vector Converter Command Line

PDF (Portable Document Format) is one of the most popular formats used for storing document files which include both text and graphics. As opposed to other formats with a similar function, PDFs can be easily transferred between different applications and different operating systems, and generally don't have a very large size. Moreover, they can offer decent image quality in a compressed format and can be secured with passwords or watermarks.

PCL (Printer Command Language) is a format associated with Hewlett-Packard printers, containing a standardized protocol that facilitates communication between computers and printers. PCL files contain commands related to features such as: drawing tools, font rendering, macros, Unicode symbols, raster areas etc.

Converting PDF to PCL by PDF to Vector Converter Command Line

So, how to change PDF into PCL?

The quick and simple way to handle your files is to get a quality piece of software, such as "PDF to Vector Converter Command Line" software. "PDF to Vector Converter Command Line" will help you avoid spending countless hours trying to figure out how to convert PDFs, you can use this software to convert from PDF files to PCL files easily.

PDF to Vector Converter Command Line can be downloaded from this web page,

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

after you download it, you can run following command line to convert your PDF files to PCL files,

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

pdf2vec.exe -printermargins D:\test.pdf D:\out.pcl

pdf2vec.exe -scalex 90 -scaley 90 -printermargins D:\test.pdf D:\out.pcl

Please notice, you need run a CMD window by administrator privilege, and then run above command line in this CMD window by manual, pdf2vec.exe will install a PCL Printer automatically during conversion, you will also get the output PCL file after a few seconds, everything will be done automatically, just run this one command line is enough.

PDF Compressor

How to compress the PDF files in a folder and and sub-folders recursively?

Hello,

I have the following directory,

C:\Electronic Invoice\B01\20170101\10.PDF
C:\Electronic Invoice\B01\20170102\11.PDF
C:\Electronic Invoice\B01\20170103\12.PDF
C:\Electronic Invoice\B01\20170103\13.PDF
C:\Electronic Invoice\B01\20170204\15.PDF
C:\Electronic Invoice\B01\20170209\16.PDF
C:\Electronic Invoice\B01\20170211\17.PDF
C:\Electronic Invoice\B02\20170103\01.PDF

Can I compress everything in a single command line?

Customer
----------------------------------------------------

You can download VeryDOC PDF Compressor Command Line from this web page,

https://www.verydoc.com/pdfcompressor.html

This can be done easily by VeryDOC PDF Compressor Command Line software, you can run following command line to compress all PDF files in "C:\Electronic Invoice" folder and sub-folders (recursion),

for /r "C:\Electronic Invoice" %F in (*.pdf) do pdfcompressor.exe -ci jpg -cidown -cidownres 50 -gi jpg -gidown -gidownres 50 -mi fax -midown -midownres 50 "%F" "%~dpnF-out.pdf"

VeryPDF
----------------------------------------------------
Thank you very much, two more things
How do I make the output file have the same name as the input file
How does this work for network drives?

Customer
----------------------------------------------------
>>How do I make the output file have the same name as the input file

Thanks for your message, if you want to keep the same filenames for input and output files, you can run following command line,

for /r "C:\Electronic Invoice" %F in (*.pdf) do pdfcompressor.exe -ci jpg -cidown -cidownres 50 -gi jpg -gidown -gidownres 50 -mi fax -midown -midownres 50 "%F" "%~dpnF.pdf"

>>How does this work for network drives?

Yes, it does support network mapped drives, you can map the network path to local drive first, then you can compress the PDF files on this network path properly.

VeryPDF

PostScript to PDF Converter

If I have vector EPS file and convert it with PS2PDF SDK do I get a vector PDF?

I already have bought the PS 2 Image SDK and am happy with it.

I now have a need to convert EPS 2 PDF (vector) and see that you have a PS2PDF SDK.

I have some questions:

  • If I have vector EPS file and convert it with PS2PDF SDK do I get a vector PDF?
  • Are all color information (possibly CMYK, ICC-profiles etc.) preserved during conversion?
  • Which PDF version will be the resulting file?
  • Does the conversion work properly if the EPS file contains raster and vector information mixed?
  • Is the SDK 32 Bit or 64 Bit?

Thank you in advance.

Best Regards
Customer
--------------------------------------------------------
>>· If I have vector EPS file and convert it with PS2PDF SDK do I get a vector PDF?

Yes, Postscript to PDF Converter SDK does convert from vector EPS files to vector PDF files.

>>· Are all color information (possibly CMYK, ICC-profiles etc.) preserved during conversion?

Yes.

>>· Which PDF version will be the resulting file?

The version of resultant PDF file is v1.4, the resultant PDF files can be viewed by any PDF Viewer applications.

>>· Does the conversion work properly if the EPS file contains raster and vector information mixed?

Yes, of course, our PS2PDF SDK does handle raster and vector mixed information properly.

>>· Is the SDK 32 Bit or 64 Bit?

The Postscript to PDF Converter SDK (ps2pdf.dll) is 32bit, we are also provide 64bit COM interface (ps2pdfcom.exe), you can call it from both 32bit and 64bit applications.

VeryDOC

School See Also:

How to use ps2pdfsdk from 64bit C# application?
http://www.verypdf.com/wordpress/201301/how-to-use-ps2pdfsdk-from-64bit-c-application-34100.html

How to use ps2pdfsdk and ps2pdfcom to convert Postscript, PS and EPS files to PDF files from 64bit C# application?
http://www.verypdf.com/wordpress/201501/how-to-use-ps2pdfsdk-and-ps2pdfcom-to-convert-postscript-ps-and-eps-files-to-pdf-files-from-64bit-c-application-41215.html

I am using "VeryPDF_PSToPDF" API to convert PS (Postscript), EPS to PDF, the return code is -2?
https://www.verydoc.com/blog/i-am-using-verypdf_pstopdf-api-to-convert-ps-postscript-eps-to-pdf-the-return-code-is-2.html