Batch script to convert PDF files to image files

Forum for the PDF-XChange Editor - Free and Licensed Versions

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Post Reply
dwg11
User
Posts: 64
Joined: Fri Jan 06, 2017 5:27 am

Batch script to convert PDF files to image files

Post by dwg11 »

Is it possible to batch convert PDF files into image files, using coding such as a script?
It's via Export to Image, choosing the image file, all the Options, saving to folder, etc.
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17901
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Batch script to convert PDF files to image files

Post by Tracker Supp-Stefan »

Hello dwg11,

It can't really be done with the Editor, but you can use PDF Tools through the command line:
https://help.pdf-xchange.com/pdfxt ... ons_t.html
And set up a tool that will do your conversions for you!

Kind regards,
Stefan
dwg11
User
Posts: 64
Joined: Fri Jan 06, 2017 5:27 am

Re: Batch script to convert PDF files to image files

Post by dwg11 »

Thanks, I did try this. Using the Export PDF to Images tool. Without any coding.
However there are no settings apart from the DPI.
I need to adjust all of the ones below.
Can this be resolved with coding?

Capture.PNG
dwg11
User
Posts: 64
Joined: Fri Jan 06, 2017 5:27 am

Re: Batch script to convert PDF files to image files

Post by dwg11 »

Could you help me get started.
Where is the command line written?
Can it account for the above settings?
Willy Van Nuffel
User
Posts: 2391
Joined: Wed Jan 18, 2006 12:10 pm

Re: Batch script to convert PDF files to image files

Post by Willy Van Nuffel »

Hello,

As PDF-Tools offers the opportunity to run conversion in batch, I suppose you do not really need command line.

In PDF-Tools you can find similar Image Saving Options compared to those in PDF-XChange Editor.

Best regards.
Attachments
PDF-Tools - Image Saving Options.png
dwg11
User
Posts: 64
Joined: Fri Jan 06, 2017 5:27 am

Re: Batch script to convert PDF files to image files

Post by dwg11 »

Thanks for pointing that out.

Can you please advise for the following:
- There is no setting for DPI in the Image Saving Options dialogue. This is quite important. Or does it take the default setting in PDF-XChange Editor?
- Why is there no choice for TIFF for single page documents?
- I trialled on 2 PDF documents and it's really slow, and froze my system. Is this expected? I don't mind if it's slow but I can't work on anything else in the meantime.

Also I/m not getting email alerts.
Willy Van Nuffel
User
Posts: 2391
Joined: Wed Jan 18, 2006 12:10 pm

Re: Batch script to convert PDF files to image files

Post by Willy Van Nuffel »

I suppose that the DPI-settings depend of the Export PDF to Image(s) settings.

For what concerns your other questions:
- Why is there no choice for TIFF for single page documents?
- Why is this so slow or why does it freeze?
- Why I am not getting email alerts?
I will have to leave those answers up to the people of Tracker Software Support.

Best regards.
Attachments
PDF-Tools - Export to Images.png
dwg11
User
Posts: 64
Joined: Fri Jan 06, 2017 5:27 am

Re: Batch script to convert PDF files to image files

Post by dwg11 »

All right thank you.
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17901
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Batch script to convert PDF files to image files

Post by Tracker Supp-Stefan »

:)
Willy Van Nuffel
User
Posts: 2391
Joined: Wed Jan 18, 2006 12:10 pm

Re: Batch script to convert PDF files to image files

Post by Willy Van Nuffel »

@Stefan - Tracker Support:

A few questions still need an answer that I could not give myself.

See here above please in my previous post.
dwg11
User
Posts: 64
Joined: Fri Jan 06, 2017 5:27 am

Re: Batch script to convert PDF files to image files

Post by dwg11 »

I am now having issues just processing 2 drawings, one at 4MB and one at 200kB. After waiting 5-10 minutes, it's still at less than 50% completion.
Why does this occur?

Even with checking the box "Multi-Threaded Processing Mode".
dwg11
User
Posts: 64
Joined: Fri Jan 06, 2017 5:27 am

Re: Batch script to convert PDF files to image files

Post by dwg11 »

Could someone please assist with this.
Willy Van Nuffel
User
Posts: 2391
Joined: Wed Jan 18, 2006 12:10 pm

Re: Batch script to convert PDF files to image files

Post by Willy Van Nuffel »

Hello dwg11,

It is a little bit strange that you do not get an answer a little bit sooner from @Tracker Support.

So, I ran a few more tests with PDF-Tools:

1) It seems like there is a clear distinction between single page and multiple page image output formats.
In case you have chosen for an output to a multipage image format than that choice will be taken.
In case you have chosen for an output to a single page image format than the choice will depend of the parameter "Always use multipage format". So, if you like to have an output to single page TIFF images, you have to mark this parameter.

2) In case you have chosen for an output to 300 dpi or lower, than the response time is acceptable.
If you select 600 dpi than it takes almost forever.
I have ran a test in PDF-XChange Editor (build 352) with a same PDF and output settings (600 dpi - TIFF) and in there, the processing time is not fast but still acceptable. So, I suppose there must be something wrong in PDF-Tools for what concerns higher dpi settings.

3) For notifications by e-mail, I do not use this myself, but I think you will have to look into your "User Control Panel":
- Click your name at the top right, and click User Control Panel
- In the top link bar, click Board preferences
- Click Edit posting defaults > Notify me upon replies by default = YES
- Click Edit notification options > Someone replies to a topic you have bookmarked = YES
@Tracker Support : please correct me if I am wrong.

Regards.
dwg11
User
Posts: 64
Joined: Fri Jan 06, 2017 5:27 am

Re: Batch script to convert PDF files to image files

Post by dwg11 »

Thanks for responding.
With respect to converting using PDF-Tools, how do you set the DPI though, there is no setting. Assuming it's the setting on PDF XChange, I did change this to 300dpi, but still does not process. Stuck on 32% for ages.
I'm assuming you're with Tracker, is this not the case?
Can someone please resolve.
Willy Van Nuffel
User
Posts: 2391
Joined: Wed Jan 18, 2006 12:10 pm

Re: Batch script to convert PDF files to image files

Post by Willy Van Nuffel »

No, I am not from Tracker Software, I am just an ordinary end-user like you are, just trying to help other ones.

The DPI-settings for the resulting images should just be those like shown in the screenshot in one of my previous posts in this topic.

I do not know if you have a license for one or more products of Tracker Software / PDF-XChange, but if you would like to run a test with PDF-XChange Editor > File > Export, only for a comparison between Editor and Tools, that would be nice. If you also have problems with converting the same file in PDF-XChange Editor to TIFF-images at 300 dpi (or lower) than there is maybe a problem with the PDF itself. In this latter case, you could think about sending that PDF to Tracker support for further investigation, or if the content is nothing personal or confidential, you can also post it on this forum.
dwg11
User
Posts: 64
Joined: Fri Jan 06, 2017 5:27 am

Re: Batch script to convert PDF files to image files

Post by dwg11 »

Thanks, I did miss that part with the DPI.
Setting at 300dpi did work for me as well.
I did purchase the PDF XChange Editor Plus and that's what I've been using. The speed is probably the same, maybe quicker on the Editor but you have to stay on it though (many documents). Ideally the Tools software should work with 600dpi as that's the setting I mainly use.
There is no problem with the PDFs as I've tried different ones and all convert with the Editor.
Willy Van Nuffel
User
Posts: 2391
Joined: Wed Jan 18, 2006 12:10 pm

Re: Batch script to convert PDF files to image files

Post by Willy Van Nuffel »

Thanks for your answer.

@Tracker Software :
1) Can you please investigate the problem with "Export PDF to images" higher than 300 dpi with PDF-Tools (build 352) ?
2) The "Export PDF to images"-feature, is it 'for free' in PDF-Tools, because I do not see any publicity marks in the resulting images ?

Regards.
User avatar
Dimitar - Tracker Supp
Site Admin
Posts: 1794
Joined: Mon Jan 15, 2018 9:01 am

Re: Batch script to convert PDF files to image files

Post by Dimitar - Tracker Supp »

Hello all,

I'm not sure how we missed this topic. I apologize for that.

I tested the problem at my end by using a few large and few small files but all of the results were as expected.

Could you please provide us with some of your files ( preferably sent to our email support@pdf-xchange.com ), so we can try to reproduce the issue with them?

Regards.
Willy Van Nuffel
User
Posts: 2391
Joined: Wed Jan 18, 2006 12:10 pm

Re: Batch script to convert PDF files to image files

Post by Willy Van Nuffel »

@Tracker Software Support

1) To be clear: the problem is not about small or large PDF-files, but about the resolution of the resulting images.
In case you set this to 600x600 dpi, there is almost no more progress in the process.

2) Do you have some info about my second question: No need for a license to use the "Export to images" feature in PDF-Tools ?

Thanks.
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8579
Joined: Wed Jan 03, 2018 6:52 pm

Re: Batch script to convert PDF files to image files

Post by TrackerSupp-Daniel »

Hello, Willy Van Nuffel

I believe that the DPI issues you mentioned before have been fixed since this discussion was ongoing. Regarding the availability of features in PDF-Tools. Technically ALL tools in PDF-Tools require a license for use, and can only be used for free in "evaluation mode" (meaning demo stamps are placed when changes occur in a docuemnt). But, those tools which do not directly edit the file may be unable to enforce those rules. In this situation, since we are not directly editing the PDF or the image, only extracting it, you will find that you can, coincidentally, use it without demo stamps if you are not making any changes to the PDF file beforehand.

This is not an intended "free" feature, but one which we cannot yet find a suitable way to "lock down" without negatively impacting people who are evaluating our software. At the end of the day, we do want people to be comfortably able to look at our software and test its features, so they can make a confident purchase.

Kind regards,
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
Post Reply