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)

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!