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

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

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

How to run doc2pdf.exe from an non-administrator user account?

We use doc2pdf in a C# windows service to parse documents. Windows service requires to run under administrator user to run doc2pdf.

My question to you,

Is it really admin user require to run doc2pdf in windows server or can we remove admin user and set any other user instead?

Customer
--------------------------------------
You can run doc2pdf.exe from any user account even if this user account hasn't administrator privilege, because doc2pdf.exe is require MS Office to convert office documents to PDF files, so this user account must has enough privilege to run MS Office applications.

You can also download and try our DOC to Any Converter Command Line software, DOC to Any Converter Command Line has three methods to convert office files to PDF files,

1. Use MS Office,
2. Use OpenOffice,
3. Use VeryDOC's Office render engine,

We hope this software will work better for you,

https://www.verydoc.com/doc-to-any.html

Please look at following web pages for more information,

https://www.verydoc.com/blog/doc2any-command-line-and-sdk-supported-document-formats.html

https://www.verydoc.com/blog/verydoc-doc-to-any-converter-command-line-v3-5-release-notes-convert-word-to-pdf-without-office-and-openoffice.html

https://www.verydoc.com/blog/verydoc-release-notes-verydoc-releases-an-exe-com-of-verypdfcomruncmd-exe-today-verypdf-exe-com-does-allow-you-to-call-ms-office-and-any-exe-application-from-asp-php-c-net-etc-program-languag.html

https://www.verydoc.com/blog/how-to-call-doc2any-exe-from-php-source-code.html

btw, if you will run doc2pdf.exe from an non-administrator user account, please login this user account first, run doc2pdf.exe in CMD window to convert a doc file to pdf file, if you can get it work correctly, you should no problem to run doc2pdf.exe from Windows service to execute the conversion.

If you will use doc2any.exe application, you can use VeryPDFComRunCmd.exe to call doc2any.exe from Windows Service, please look at following web page for more information,

https://www.verydoc.com/blog/verydoc-release-notes-verydoc-releases-an-exe-com-of-verypdfcomruncmd-exe-today-verypdf-exe-com-does-allow-you-to-call-ms-office-and-any-exe-application-from-asp-php-c-net-etc-program-languag.html

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)
pcl, ps, pdf page counter

problem finding ReadInfo.dll library, an unhandled exception of type ‘System.DllNotFoundException’ error message

I am using the trial version of your Spool File Page Counter SDK to count color pages. I have requested that we purchase the product. The csharp sample you provided works perfectly. However, when I test within my own application I get the following error for the ReadInfo.dll file,

An unhandled exception of type 'System.DllNotFoundException'

Can you provide instructions on how to use the dll within a C# program? I have included the code I use,
-----------------------------
sing System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using SawgrassMutualShared;

namespace SawgrassMutualBL
{
    public class ColorCounter
    {
        [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);
       
        public SawgrassMutualShared.ColorCounts Count(string FileType)
        {
            var InputDir = Properties.Settings.Default.Input;
            var WorkDir = Path.Combine(InputDir, FileType);
            var files = Directory.GetFiles(WorkDir, "*.pdf");
            var cCounts = new ColorCounts();
            cCounts.FileType = FileType;
            foreach(var fileName in files)
            {
                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);
                cCounts.ColorCount += (int)colorPageCount;
                cCounts.BWCount += (int)bwPageCount;
            }
            return cCounts;
        }
    }
}

Customer
-------------------------------------------
Please compile your C# code into an EXE file first, place this EXE and DLL files into same folder, run your EXE from this folder, your EXE will able to load necessary DLL files properly.

The folder should contain following files,

Your-EXE-File.exe
cimage.dll
cximagecrt.dll
Interop.FileInfoCOM.dll
pcl.dll
pcltool.dll
pdftoolsdk.dll
ReadInfo.dll
fonts\*.*

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)
pdf to image converter

How to get PDF to Image Converter SDK C++ to work on both x86 and x64 systems?

Hi support,

I downloaded the software from,

http://www.verypdf.com/app/pdf-to-image-converter/try-and-buy.html#buy-cmd
http://www.verypdf.com/pdf2tif/pdf2image_sdk_trial.zip

I plan to integrate this with C++ code... however, I have found there is no detail document here either. Could you let me know what are the necessary library that I need to include for use the C++ SDK for 64bit OS? I only found the instruction for ASP user. I plan to get this going and test it so that I can make decision of purchasing in early next week. Please let me know.

Thanks,
Customer
-----------------------------------------
Thanks for your message, you may call PDF2ImageCOM.exe from 64bit C++ code, please look at following web pages for more information,

http://www.verypdf.com/wordpress/201107/call-pdf-to-image-converter-com-component-v2-0-from-64bit-application-1191.html

The latest version of PDF2Image SDK contains a PDF2ImageCOM.exe file, this is the COM interface, this COM interface can be called from both 32bit and 64bit applications.

Please put PDF2ImageCOM.exe and pdf2image.dll, cimage.dll files into same folder, launch a CMD window by administrator privilege, run following command line to register it,

PDF2ImageCOM.exe /regserver

After you register it, you can call asp_PDFToImageConverter() function from 32bit or 64bit code to convert PDF files to image files, please refer to following VBS code,

~~~~~~~~~~~~~~~~~
'please run "64bit-com-install.bat" to register PDF2ImageCOM.exe first
Set pdfcom = CreateObject("PDF2Image.CPDF2Image")
pdfcom.asp_PDFToImageSetCode("XXXXXXXXXXXXXXXXXXXX")
pdfcom.asp_PDFToImageSetFileNameSuffix("")
nRet = pdfcom.asp_PDFToImageConverter("C:\\1.pdf", "C:\\1.jpg", "", "", 200, 200, 24, 32773, 85, 0, 0, 1, 1)
~~~~~~~~~~~~~~~~~

You can also refer to the test steps at below,

You can download the latest version of PDF2Image SDK from following URL,

http://www.globalpdf.com/pdf2tif/pdf2image_sdk_trial.zip

latest version of PDF2Image SDK does contain the 64bit COM interface, you can use it by following steps,

1. Run "64bit-com-install.bat" or following command line to install PDF2ImageCOM.exe into your system, you need run it by administrator privilege,

PDF2ImageCOM.exe /regserver

2. You can use following 64bit code to test its capability,

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dim oTest, nPageCount, nPageWidth, nPageHeight
Set oTest = CreateObject("PDF2Image.CPDF2Image")
m_strInputFileName = "C:\test.pdf"
oTest.asp_PDFToImageSetCode("XXXXXXXXXXXXXXXXXXXXXX")
nPageCount = oTest.asp_PDFToImageGetPageCount(m_strInputFileName)
nPageWidth = oTest.asp_PDFToImageGetPageWidth(m_strInputFileName, 1)
nPageHeight = oTest.asp_PDFToImageGetPageHeight(m_strInputFileName, 1)
'Converter PDF file to TIFF file by DPI information
oTest.asp_PDFToImageConverter m_strInputFileName, "C:\example1_tiffpack.tiff", "", "", 300, 300, 24, 32773, 70, 0, 1, -1, -1
oTest.asp_PDFToImageConverter m_strInputFileName, "C:\example1.emf", "", "", 300, 300, 24, 32773, 70, 0, 1, -1, -1
'Converter PDF file to TIFF file by page size information
oTest.asp_PDFToImageConverterEx m_strInputFileName, "C:\example1_tiffpack_page_size.tiff", "", "", 1, nPageWidth, nPageHeight, 24, 32773, 70, 0, 1, -1, -1

MsgBox "Convert Success!"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

For the C++ code, you can add a reference to PDF2ImageCOM.exe, then you can call it from 64bit source code easily, if you can't get it work, please feel free to let us know, we will prepare an example for you asap.

VeryPDF
-----------------------------------------
Hi there,

I am mainly looking for C++ example. I have looked at the folders from

http://www.verypdf.com/pdf2tif/pdf2image_sdk_trial.zip

There are VC, VC2, VC3, VC4...etc and I have tried to use the code and build a stand alone project but didn't get any output.

There are instructions for vbs code which I don't know whether they are needed for C++ but I did that anyways.

Would you please send me a very simple VS C++ project code that demonstrate a simple task: counting the number of page of a input pdf file and outputting the pages into separated image files.

Thanks,
Customer
-----------------------------------------
Hi support,

Please ignore my stupid question in my previous email. I simply did not realized there is a dsp file in the VC folder. It was default to be opened from notepad. Therefore, I didn't quite understand what should I do with it.
I should be fine for now.

Thanks,
Customer
-----------------------------------------
Everything works great! I wonder if all the features are available with unlicensed version (so that we can evaluate the quality and capability better) and if there is any detail documentation about all the parameter settings that I can use for the pdf to image conversion, ie compress type, quality, the range of resolution value, quality...etc.

Also, what is the PDFToImageSetCode refers to in the C++ project code?

Thanks,
Customer
-----------------------------------------
Thanks for your message, please look at the "PDF to Image Converter COM component user manual" from following web page,

http://www.verypdf.com/pdf2tif/pdf-to-image-sdk.htm

Yes, the unlicensed version is contain all functions except for the demo watermark, after you purchase it, please pass your license key to PDF2Image SDK, the demo watermark will be removed from generated image files.

Please set your license key to PDFToImageSetCode() function, you will able to register PDF2Image SDK successful,

void __stdcall PDFToImageSetCode(const char *lpRegcode)
Description:
Register your PDF2Image SDK by the given Registration Key.

VeryPDF
-----------------------------------------
The information/reference is very helpful which I did not find it before.

I will get it a try. You guys are very much likely to get our business. Thank you very much for the help! 

Customer
-----------------------------------------
Hi,

1. for the PDF2Image settings, what is the unit for resolution setting (X, Y)? When we set to 200, 200 for x and y, the converted image resolution is more than 1000 x 1000 resolution. Does the resolution actually refer to DPI?

2. In most of the PDF that I tested converted from google PowerPoint, all the transparent text boxes will be converted into black box on image. Do you know whether it is due to the conversion limitation or incorrect settings?

Thanks!
Customer
-----------------------------------------
>>1. for the PDF2Image settings, what is the unit for resolution setting (X, Y)? When we set to 200, 200 for x and y, the converted image resolution is more than 1000 x 1000 resolution. Does the resolution actually refer to DPI?

The Unit is DPI, it is XXX points per inch, in general, you can set X and Y DPI to 200x200 or 300x300 DPI.

>>2. In most of the PDF that I tested converted from google PowerPoint, all the transparent text boxes will be converted into black box on image. Do you know whether it is due to the conversion limitation or incorrect settings?

Can you please send to us your sample PDF file for test purpose? after we reproduce your problem in our system, we will figure out a solution to you shortly.

btw, you can also download and test "PDF to Image Converter Command Line", we hope "PDF to Image Converter Command Line" will work better for you,

http://www.verypdf.com/app/pdf-to-image-converter/try-and-buy.html#buy-cmd
http://www.verypdf.com/dl2.php/pdf2image_win.zip

VeryPDF
-----------------------------------------
Thank you for the reply.

I have attached the one of files that I had problem with. This PDF is generated by Google Slide. I did actually have problem with pdf generated from OpenOffice as well where only the first image shown but not the rest of the image from the slides. However, we could not replicate it for now since we did not keep the test pdf that originally created.

Here is the parameter that I use.
============================================================================
PDFToImageConverter(input_file_path.c_str(), output_file_path.c_str(), NULL, NULL, 200, 200, 24, COMPRESSION_JPEG, 100, FALSE, FALSE, -1, -1);
============================================================================

Thanks,
Customer
-----------------------------------------
Please look at attached image files, these image files were created by PDF2Image SDK in my system, they are look fine, can you get same image files in your system?

btw, you may change the compression method to COMPRESSION_PACKBITS to try again when you convert from PDF file to TIFF file, for example,

PDFToImageConverter(input_file_path.c_str(), output_file_path.c_str(), NULL, NULL, 200, 200, 24, COMPRESSION_PACKBITS, 100, FALSE, FALSE, -1, -1);

Can you work fine now?
VeryPDF
-----------------------------------------
No, it does not work. Even though I use the exact line you provided.

However, I got it to work with those function calls from dll:

PDFToImageConverter2
PDFToImageConverter2Ex

What is the difference between the ones ending with 2 and the ones not ending in 2? See below. Only the ones ending in 2 work correctly with google slides but I would like to know why and what the difference between the two is and is it safe to use the one end up with 2 or 2EX?

PDFToImageConverter
PDFToImageConverterEx
PDFToImageConverter2
PDFToImageConverter2Ex

I need to do more extensive tests before purchasing it but once you tell me the differences and whether it is safe to use just one of the 4 function calls. If not, what will be the work around? Please help me answer those questions. I need to purchase 2 of development license soon if everything works out.

I attach another pdf generated by google slide.

Thanks,
Customer
-----------------------------------------

PDFToImageConverter and PDFToImageConverter2 are using two different methods to render PDF file to image files, in general, you can use PDFToImageConverter2() function.

PDFToImageConverterEx and PDFToImageConverter2Ex functions can be used to convert PDF file to image files with specify width and height, if you needn't control the images with width and height, the PDFToImageConverter2() function is enough for you.

Yes, it is safe for you to use just one function.

If you still can't get it work, please feel free contact me on skype, my skype is xue.heng, I will assist you online easily.

You can also run compiled EXE in CMD window for test purpose, for example,

pdf2image_vc3.exe D:\test.pdf D:\out.png

Can you run the compiled EXE in CMD window by manual correctly?

VeryPDF
-----------------------------------------
Thanks, I think everything works fine so far with version 2. I will do more extensive test. Thanks for the explanation. I will ask my colleagues to help me test more before I place the order. Thanks!

Customer
-----------------------------------------
We are attempting to get the PDFToImageConverter library to build in 64 bit. We currently have everything built and running perfectly in 32 bit but it are unable to find 64 bit versions of any of the dll's or lib's. Do you support 64 bit applications and if so can you provide us with the appropriate files?

Customer
-----------------------------------------
On the 64bit system, you need compile your project with "x86 platform" option, then your project will able to load PDF2Image DLL files properly.

If your project was compiled with 64bit, you can use PDF2ImageCOM.exe to instead of pdf2image.dll, PDF2ImageCOM.exe is a COM interface which provided to 64bit application, please look at following web pages for more information,

http://www.verypdf.com/wordpress/201303/64bit-version-of-pdf-to-image-converter-com-35162.html

http://www.verypdf.com/wordpress/201107/call-pdf-to-image-converter-com-component-v2-0-from-64bit-application-1191.html

http://www.verypdf.com/wordpress/201107/pdf-to-tiff-conversion-issues-1286.html

http://www.verypdf.com/wordpress/201610/how-to-getting-pdf-to-image-converter-sdk-c-to-work-43086.html

you may call PDF2ImageCOM.exe from 64bit C++ code, please look at following web pages for more information,

http://www.verypdf.com/wordpress/201107/call-pdf-to-image-converter-com-component-v2-0-from-64bit-application-1191.html

The latest version of PDF2Image SDK contains a PDF2ImageCOM.exe file, this is the COM interface, this COM interface can be called from both 32bit and 64bit applications.

Please put PDF2ImageCOM.exe and pdf2image.dll, cimage.dll files into same folder, launch a CMD window by administrator privilege, run following command line to register it,

PDF2ImageCOM.exe /regserver

After you register it, you can call asp_PDFToImageConverter() function from 32bit or 64bit code to convert PDF files to image files, please refer to following VBS code,

~~~~~~~~~~~~~~~~~
'please run "64bit-com-install.bat" to register PDF2ImageCOM.exe first
Set pdfcom = CreateObject("PDF2Image.CPDF2Image")
pdfcom.asp_PDFToImageSetCode("XXXXXXXXXXXXXXXXXXXX")
pdfcom.asp_PDFToImageSetFileNameSuffix("")
nRet = pdfcom.asp_PDFToImageConverter("C:\\1.pdf", "C:\\1.jpg", "", "", 200, 200, 24, 32773, 85, 0, 0, 1, 1)
~~~~~~~~~~~~~~~~~

You can also refer to the test steps at below,

* You can download the latest version of PDF2Image SDK from following URL,

http://www.globalpdf.com/pdf2tif/pdf2image_sdk_trial.zip

latest version of PDF2Image SDK does contain the 64bit COM interface, you can use it by following steps,

1. Run "64bit-com-install.bat" or following command line to install PDF2ImageCOM.exe into your system, you need run it by administrator privilege,

PDF2ImageCOM.exe /regserver

2. You can use following 64bit code to test its capability,

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dim oTest, nPageCount, nPageWidth, nPageHeight
Set oTest = CreateObject("PDF2Image.CPDF2Image")
strInputFileName = "C:\test.pdf"
oTest.asp_PDFToImageSetCode("XXXXXXXXXXXXXXXXXXXXXX")
nPageCount = oTest.asp_PDFToImageGetPageCount(strInputFileName)
nPageWidth = oTest.asp_PDFToImageGetPageWidth(strInputFileName, 1)
nPageHeight = oTest.asp_PDFToImageGetPageHeight(strInputFileName, 1)
'Converter PDF file to TIFF file by DPI information
oTest.asp_PDFToImageConverter strInputFileName, "C:\example1_tiffpack.tiff", "", "", 300, 300, 24, 32773, 70, 0, 1, -1, -1
oTest.asp_PDFToImageConverter strInputFileName, "C:\example1.emf", "", "", 300, 300, 24, 32773, 70, 0, 1, -1, -1
'Converter PDF file to TIFF file by page size information
oTest.asp_PDFToImageConverterEx strInputFileName, "C:\example1_tiffpack_page_size.tiff", "", "", 1, nPageWidth, nPageHeight, 24, 32773, 70, 0, 1, -1, -1

MsgBox "Convert Success!"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

For the C++ code, you can add a reference to PDF2ImageCOM.exe, then you can call it from 64bit source code easily, if you can't get it work, please feel free to let us know, we will prepare an example for you asap.

VeryPDF

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