[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x

Windows Batch

11K

Solutions

11K

Contributors

Batch files are text files containing a script of commands that are executed by the command interpreter on DOS, OS/2 and Windows systems. Most commonly, they are used to perform a series of functions that are repeated -- copying a set of files created daily with one step, for example.

Share tech news, updates, or what's on your mind.

Sign up to Post

Xpdf - PDFfonts - Command Line Utility to List Fonts Used in a PDF File
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. In addition to the name of the font, it shows the font type and whether or not the font is embedded in the PDF file (and, if embedded, whether or not it is a subset), along with other font information that is discussed in the documentation file. It does this via a command line interface, making it suitable for use in batch files, programs, and scripts — any place where a command line call can be made.

1. Download the software


You may have already downloaded and unzipped the Xpdf tools while watching the first video in the Xpdf series, but if you haven't, then visit the Xpdf website. Click the Download link and then click the pre-compiled Windows binary ZIP archive to download the utilities for Windows.

Step1

2. Locate the documentation folder for the Xpdf utilities


Go to the folder where you unzipped the downloaded ZIP file and find the doc folder.

Step2

3. Read the documentation for the PDFfonts tool


Go into the doc folder and find the plain text file called pdffonts.txt.

Open it with any text editor, such as Notepad, and read it. This is the documentation for the PDFfonts tool.

Step3

4. Set up a test folder


Create a test folder.

Copy pdffonts.exe from the unzipped bin32 folder into your test folder.

Copy a couple of sample PDF files into your test folder, preferably ones with many different fonts.

Step4

5. Set up a command prompt for testing

2
LVL 19

Administrative Comment

by:Kyle Santos
Congratulations!  Your video has been Accepted and is now published on Experts Exchange.  Thank you for your contributions.
1
LVL 62

Author Comment

by:Joe Winograd, Fellow&MVE
Hi Kyle,
Thanks for publishing and upvoting — both appreciated! Regards, Joe
1
Become a CompTIA Certified Healthcare IT Tech
LVL 12
Become a CompTIA Certified Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

Xpdf - PDFtoPNG - Command Line Utility to Convert a Multi-page PDF File into Separate PNG Files
In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a command line interface, making it suitable for use in batch files, programs, and scripts — any place where a command line call can be made.

1. Download the software


You may have already downloaded and unzipped the Xpdf tools while watching the first video in the Xpdf series, but if you haven't, then visit the Xpdf website. Click the Download link and then click the pre-compiled Windows binary ZIP archive to download the utilities for Windows.

Step1

2. Locate the documentation folder for the Xpdf utilities


Go to the folder where you unzipped the downloaded ZIP file and find the doc folder.

Step2

3. Read the documentation for the PDFtoPNG tool


Go into the doc folder and find the plain text file called pdftopng.txt.

Open it with any text editor, such as Notepad, and read it. This is the documentation for the PDFtoPNG tool.

Step3

4. Set up a test folder


Create a test folder.

Copy pdftopng.exe from the unzipped bin32 folder into your test folder.

Copy a sample PDF file into your test folder. Of course, it will work fine with a one-page PDF file, but it is more instructive to test it with a multi-page PDF.

Step4

5. Set up a command prompt for testing


Open a command prompt window.

Navigate to your test folder.

Issue a DIR command in the command prompt to be sure that only two files are in it - the PDFtoPNG executable and the sample PDF file.

Step5

6. Run the PDFtoPNG utility

1
LVL 62

Author Comment

by:Joe Winograd, Fellow&MVE
Kyle,
Thanks for the fast publishing and the compliment — both appreciated! Regards, Joe
1
LVL 62

Author Comment

by:Joe Winograd, Fellow&MVE
Hi Tia Henderson,
I'm sure that you meant to endorse this video (rather than Kyle's comment that it was Accepted and my comment thanking Kyle). To endorse the video, you must click the thumbs-up icon that is right underneath the video steps (before this Comments section begins). Thanks, Joe
0
Xpdf - PDFdetach - Command Line Utility to Detach Attachments from PDF Files
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable for use in batch files, programs, and scripts — any place where a command line call can be made.

1. Download the software.


You may have already downloaded and unzipped the Xpdf tools while watching the first video in the Xpdf series, but if you haven't, then visit the Xpdf website. Click the Download link and then click the pre-compiled Windows binary ZIP archive to download the utilities for Windows.

Step1

2. Locate the documentation folder for the Xpdf utilities.


Go to the folder where you unzipped the downloaded ZIP file and find the <doc> folder.

Step2

3. Read the documentation for the PDFdetach tool.


Go into the <doc> folder and find the plain text file called <pdfdetach.txt>.

Open it with any text editor, such as Notepad, and read it. This is the documentation for the PDFdetach tool.

Step3

4. Set up a test folder.


Create a test folder.

Copy <pdfdetach.exe> from the unzipped <bin32> folder into your test folder.

Copy a sample PDF file that has attachments into your test folder (in the video and the screenshots below, the file is called test.pdf, which is a PDF file created from my EE article, Windows 10 uses YOUR computer to help distribute itself, but with some attachments added to it).

Step4

5. Set up a command prompt for testing.

4
LVL 27

Expert Comment

by:NVIT
Hi Joe...

> A way to achieve that is to extract first with PDFdetach and then print the file to a PDF print driver.

That would work for me. Thanks!

Mahalo
1
LVL 62

Author Comment

by:Joe Winograd, Fellow&MVE
A`ole pilikia!
0
Xpdf - PDFinfo - Command Line Utility to Retrieve Page Count and Other Information from PDF Files
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF file's Info Dictionary, as well as some other information (metadata), including the page count. We show how to isolate the page count in a plain text file, and the same method may be used to isolate other metadata fields, such as the Author and PDF Producer. PDFinfo provides a command line interface, making it suitable for use in batch files, programs, and scripts — any place where a command line call can be made.

1. Download the software.


You may have already downloaded and unzipped the Xpdf tools while watching the first video in the Xpdf series, but if you haven't, then visit the Xpdf website. Click the Download link and then click the pre-compiled Windows binary ZIP archive to download the utilities for Windows.

Step1

2. Locate the documentation folder for the Xpdf utilities.


Go to the folder where you unzipped the downloaded ZIP file and find the <doc> folder.

Step2

3. Read the documentation for the PDFinfo tool.


Go into the <doc> folder and find the plain text file called <pdfinfo.txt>.

Open it with any text editor, such as Notepad, and read it. This is the documentation for the PDFinfo tool.

Step3

4. Set up a test folder.


Create a test folder.

Copy <pdfinfo.exe> from the unzipped <bin32> folder into your test folder.

Copy a sample PDF file into your test folder (in the video and the screenshots below, the file is called test.pdf, which is a PDF file created from my EE article, Windows 10 uses YOUR computer to help distribute itself).

Step4

5. Set up a command prompt for testing.

3
Xpdf - PDFtoText - Convert PDF Files to Plain Text Files
In this third video of the Xpdf series, we discuss and demonstrate the PDFtoText utility, which converts PDF files into plain text files. It does this via a command line interface, making it suitable for use in batch files, programs, and scripts — any place where a command line call can be made.

1. Download and install the software.

You may have already downloaded and installed the Xpdf tools while watching the first  or second video in the Xpdf series , but if you haven't, then visit the Xpdf website at:

http://www.foolabs.com/xpdf/

Click the Download link and then click the pre-compiled Windows binary ZIP archive to download the Xpdf utilities for Windows.
precompiled binaries

2. Locate the documentation folder for the Xpdf utilities.

Go to the folder where you unzipped the downloaded ZIP file and find the <doc> folder.
documentation folder

3. Read the documentation for the PDFtoText tool.

Go into the <doc> folder and find the plain text file called <pdftotext.txt>.

Open it with any text editor, such as Notepad, and read it. This is the documentation for the PDFtoText tool.
read me

4. Set up a test folder.

Create a test folder.

Copy <pdftotext.exe> from the unzipped <bin32> folder into your test folder.

Copy a sample PDF file into your test folder (in the video and the screenshots below, the file is called <RMP.pdf>).
test folder

5. Set up a command prompt for testing.

Open a command prompt window.

Navigate to your test folder.

Issue a DIR command in the command prompt to be sure that only two files are in it - the PDFtoText executable and the sample PDF file.
cmd prompt dir

6. Run the PDFtoText utility on the sample PDF file.

In the command prompt window, enter the following command:

pdftotext -layout samplefilename.pdf
command line

7. Verify that the text file that was created.

10
LVL 23

Expert Comment

by:Andrew Leniart
Great tutorial series. This will be very handy for me!
0
LVL 62

Author Comment

by:Joe Winograd, Fellow&MVE
Hi Andrew,
I'm glad to hear that my Xpdf series will be useful for you. This particular one, PDFtoText, is the one that I use the most in my custom programs. Cheers, Joe
P.S. Thanks for the endorsement!
0
Xpdf - Command Line Utilities for PDF Files
In this first video of the Xpdf series, we introduce and describe Xpdf, a library containing nine command line utilities that perform various functions on PDF files. We show where the library is located and how to download it, discuss its licensing provisions, and provide a brief description of each of the nine modules. Since all the utilities offer a command line interface, they are suitable for use in batch files, programs, and scripts — any place where a command line call can be made. This first video sets the stage for subsequent Micro Tutorials in this Xpdf series.

1. Download and install the software.

Visit the Xpdf website at:

http://www.foolabs.com/xpdf/

Click the Download link and then click the pre-compiled Windows binary ZIP archive to download the Xpdf utilities for Windows.
precompiled binaries

2. Read the licensing agreements.

Go to the folder where you unzipped the downloaded ZIP file.

Read the licensing agreements, which are in plain text files called COPYING (which is GNU GPL V2) and COPYING3 (which is GNU GPL V3) in the root of the unzipped archive.
licensing

3. If you need commercial licensing, visit the parent company's website.

For commercial licensing, visit the Glyph & Cog website:

http://www.glyphandcog.com/
glyph & cog

4. Locate the folder with the documentation.

Go to the folder where you unzipped the downloaded ZIP file and find the subfolder called <doc>.
documentation folder

5. Read all of the documentation.

Go into the <doc> folder and read the documentation. All of the files are plain text files that may be opened with any text editor, such as Notepad, or any software that can open a text file, such as Word or WordPad.
documentation

6. Locate the executables for the utilities.

7
LVL 23

Expert Comment

by:Andrew Leniart
Great video Joe! Excellent tool I had no idea existed.
0
LVL 62

Author Comment

by:Joe Winograd, Fellow&MVE
Thanks, Andrew, I appreciate the compliment...and the endorsement! Regards, Joe
0

Windows Batch

11K

Solutions

11K

Contributors

Batch files are text files containing a script of commands that are executed by the command interpreter on DOS, OS/2 and Windows systems. Most commonly, they are used to perform a series of functions that are repeated -- copying a set of files created daily with one step, for example.