Retrieve DPI from PDF files by PDF to Image COM Component

The attached document seems to remain locked by PDF2Image COM Component after processing with PDFToImageDrawToHDC and other functions in the dll. Could you take a look for me?

Best regards
======================================
We have created a new test package to you, please download it from following URL,

XXXXXXXXXXXXXXXXXXXXXX

Please refer to TestVeryPdf.cpp file, after PDFToImageDrawToHDC() function is called, TestVeryPdf.cpp file will call MoveFile() function to rename input PDF file,

~~~~~~~~~~~~~~~
     int nTime1 = GetTickCount();
     TestPdf(argv[1], argv[2]);
     int nTime2 = GetTickCount();
     printf("Time = %dms (%.2fs)\n",nTime2-nTime1, (nTime2-nTime1)/1000.0);
     char szNewFile[300];
     sprintf(szNewFile, "%s_new.pdf", argv[1]);
     MoveFile(argv[1], szNewFile);
~~~~~~~~~~~~~~~
In this test case, "hashavsheva  document  rtl_8.pdf.pdf.pdf" file can be renamed correctly after PDFToImageDrawToHDC() function is called, it is indicate PDFToImageDrawToHDC() function doesn’t lock the PDF file, can you please double check this matter carefully?

VeryPDF

=============================================
This version seems to fix the problem. I notice though that the following warning message is being written to stdout:

libpng warning: tEXt: CRC error

Is there a way for me to disable these messages or do you have a version that doesn't display warning messages like this?

=============================================
We have created a new test package to you, please download it from following URL,

The new cimage.dll file in this package doesn't output this warning message now.

VeryPDF
=============================================

Thanks for the new link. This works better but I think it is much slower (x2) than previous versions...

I have created a console c++ project that compares the speed of the 2 versions and you can download it from the following URL:

If you open the project and open the file pdf2image_test.cpp then you will see the line:

#define NEW_VERSION
=============================================
Sorry - I clicked send before completing my email...

Thanks for the new link. This works better but I think it is much slower (x2) than previous versions...

I have created a console c++ project that compares the speed of this version with an older one dated 13th July 2010. You can download my project from the following URL:

XXXXXXXXXXXXXXXXXXXXXXXXXX

If you open the project and open the file pdf2image_test.cpp then you will see the line:

#define NEW_VERSION   1

Leave this line as it is to run the test on the new version or change it to:

#define NEW_VERSION   0

...to run the test on the old version.

Depending on the value of NEW_VERSION the program will change folder to test/new or test/old, load the pdf2image dll and call the PDF2ImageDrawToHDC function for each pdf file (test0.pdf to test9.pdf).

On my system the old version takes 10 seconds to process the documents but the new version takes 20 seconds.

Could you take a look to see if you can tell why there is such a difference in speed?

Best regards

============================================

The following download URL is too slow, I have spent 2 hours to download this package, but no luck,

also, I suggest you may simple use the new version of cimage.dll to overwrite old version of cimage.dll, the new version doesn't print " libpng warning: tEXt: CRC error " to stdout, you needn't update the pdf2image.dll file, we hoping the new version of cimage.dll doesn't impact the conversion speed.

VeryPDF
===============================================

Sorry, something must have gone wrong on our web site. I've put the file on to drop box at the following URL:

I think it is p2isdk.dll that is causing the speed problem, but I need to use it to be able to read some pdf files that your older versions cannot read.

Could you please take a look at this because it is too slow to use at the moment.

===============================================

Thanks for your message, I have downloaded the test package from dropbox.

Yes, this speed problem is caused by p2isdk.dll library, p2isdk.dll is using a different method to render the PDF pages, it will check every elements in PDF page carefully, this will improve the correctness of conversion, but this will also slow the conversion, this is the reason why p2isdk.dll has a bit of slow than normal.

We will try to improve the speed for p2isdk.dll library in the future, we will let you know after update is available, thanks for your patience.
===============================================

Ok - but could you consider the following request that would make things so much better for me in using your software....

It would be very useful if I could call a function that would test a PDF document to see if it contains 1 image per page and nothing else. If that was the case then I could just use pdf2tif.dll to extract the images and it would be much faster than using pdf2image.dll.

The other big problem I have with pdf2image.dll is knowing what the resolution is of a scanned document. For example, say a document was scanned at 200dpi and I call pdf2image with a dpi of 300, then it takes longer to run than if I had set the dpi to 200 and is less accurate. So it would also be useful to be able to tell what the resolution of a scanned document was.

I know that PDF documents can contain a mixture of image, text and vector graphics, but the special case of pure scanned images are very interesting to me.

Best regards
===============================================

Hi,

Yes, PDF documents can contain a mixture of image, text and vector graphics, it is not easily to retrieve DPI from a PDF page.

However, we can develop two special functions to you at additional cost,

1. Check if PDF file contains 1 image per page and nothing else, it will return information for each page in PDF file,
2. Calculate DPI for each page in scanned PDF document, (if your PDF page contains text and other information, this function will not work),

If you are interest in above two functions, please feel free to let us know, we will provide a quotation for above two functions to you shortly.

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

This entry was posted in PDF to Image Converter and tagged . Bookmark the permalink.

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!