How to convert PNG file into PDF automatically

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
m_vishal_c
Posts: 2
Joined: 16 Jul 2017 23:27

How to convert PNG file into PDF automatically

#1 Post by m_vishal_c » 16 Jul 2017 23:32

Hi, i have more then 1 .PNG Files in one folder, i need to create batch file to convert those files into separate pdf format with same name. can anyone guide me. thanks in advance

aGerman
Expert
Posts: 4678
Joined: 22 Jan 2010 18:01
Location: Germany

Re: How to convert PNG file into PDF automatically

#2 Post by aGerman » 17 Jul 2017 10:29

You need a 3rd party tool. E.g. download "ImageMagick-7.0.6-1-portable-Q16-x86.zip" from there
http://www.imagemagick.org/script/binar ... hp#windows
You only need "convert.exe" out of the package. Copy it to the folder with your PNG files.
Also create a batch file in the same folder with following content:

Code: Select all

@for %%i in (*.png) do @convert "%%~i" "%%~ni.pdf"

Steffen

m_vishal_c
Posts: 2
Joined: 16 Jul 2017 23:27

Re: How to convert PNG file into PDF automatically

#3 Post by m_vishal_c » 17 Jul 2017 20:19

heaps heaps thank. it works perfectly all right. all good. much appreciated

Post Reply