Windows 10: Testing pdf files for corruption

Discus and support Testing pdf files for corruption in Windows 10 Support to solve the problem; I had a hard drive corrupt several terabytes of data on me last year. I copied all the recoverable files to a new drive, and I'm in the process of... Discussion in 'Windows 10 Support' started by rivre, Jul 30, 2017.

  1. rivre Win User

    Testing pdf files for corruption


    I had a hard drive corrupt several terabytes of data on me last year. I copied all the recoverable files to a new drive, and I'm in the process of trying to sort through it all now (I know, I should have had a backup). I know some files are fine, and others are corrupt.

    I have hundreds of .PDF files I'd like to test for corruption. Is there a tool that can do this reliably and easily, to fully test PDFs that contain either images or text or both? I'm not so good with command lines, powershell, etc., so a gui tool would be ideal. I'd like to be able to just point it to a folder of PDF files and test them all. I did find such a tool here:

    https://sourceforge.net/projects/corruptedpdfinder/

    and it seems to be ideal, however there's virtually no documentation, and it doesn't specify if it's testing images as well as text in the PDF, so I have no idea what it's actually testing. Any other suggestions, or is anyone familiar with this particular tool and can vouch for it?

    :)
     
    rivre, Jul 30, 2017
    #1

  2. Print to PDF File OK to Desktop but not to "Documents" Folder

    It seems you omitted one essential test: To copy a suspect .pdf file from the Documents folder to your desktop, then to open it. It it is corrupted in the Documents folder then it should be corrupted while on the desktop.

    I would also repeat these tests while running Windows in Safe Mode.
     
    Frederik Long, Jul 30, 2017
    #2
  3. DavidLenk Win User
    Microsoft Edge PDF problems

    Microsoft Edge keeps associating with PDF files, no articles related to resolving it work and to make it a insult to the injury microsoft edge is about the worst application in existence at viewing pdf files so why are the ignorant programmers that make
    this **** continuing to reset he association remotely without my permission?

    The EDGE browser can not print pdf files correctly they always are printed 100% wrong with overlapping half cutt off text and pictures QR codes and bar codes are printed corrupt and often dont even work when printed from EDGE..

    learn to write a program and TEST TEST TEST it even printing before you hijack my associations like terrorists.

    this is stupid and your making me and my clients regret upgrading to free windows 10.....
     
    DavidLenk, Jul 30, 2017
    #3
  4. dalchina New Member

    Testing pdf files for corruption

    dalchina, Jul 30, 2017
    #4
  5. rivre Win User
    I was actually looking at that page but it was rather confusing. Lots of talk about powershell commands and command line tools. I was hoping for something a bit more user-friendly.
     
    rivre, Jul 30, 2017
    #5
  6. rivre Win User
    Also, is there a tool to verify jpeg/png files also?
     
    rivre, Jul 31, 2017
    #6
  7. EdTittel Win User
    PDF-Online.com has a Web-based PDF validity checker that seems pretty straightforward. Find it at PDF Tools Online - Validate PDF. Suggestions on JPG integrity at Google Groups look pretty useful. There's a program at libpng.org called pngcheck that looks like it will do what you want for PNG images: pngcheck Home Page.
    HTH,
    --Ed--
     
    EdTittel, Jul 31, 2017
    #7
  8. rivre Win User

    Testing pdf files for corruption

    Thanks. I saw pngcheck and it sounds great but I have no idea what to do with it. The exe file does nothing when I run it - I'm guessing it's a command line tool. As I mentioned, I'm not much good with command line tools, and I was hoping for something user friendly. I would think there would be more tools like this available.
     
    rivre, Jul 31, 2017
    #8
  9. rivre Win User
    rivre, Jul 31, 2017
    #9
  10. EdTittel Win User
    The general syntax for pngcheck is pretty easy at the command line. Once you navigate to the folder/directory where suspect png files reside, simply type pngcheck *.png to check all local png files. You'll get output like this:

    Testing pdf files for corruption [​IMG]

    As you can see, it happily checks hundreds of files and reports either OK or an error message for each file it checks.
    Here's a set of step-by-step instructions to do this:
    0. As a preparatory step, you'll need to download pngcheck.zip, then copy the files into a known directory (let's say it's named C:\pngchk
    1. Launch cmd.exe in admin mode: type "cmd.exe" into the Cortana search box, right-click the cmd.exe entry that pops up in response, and click "Run as administrator" in the resulting pop-up menu.
    2. Within the command window navigate to the folder where the png files that you want to check reside (repeat as needed). Let's say they're on the F: drive and the folder you want is named /images. That means you'd type "F:" (omitting quotes) at the command prompt to switch to the f drive, then type "cd /images" (omitting quotes) to get into F:/images.
    3. at the command prompt, type "C:\pngchk\pngcheck *.png" and read through the output to find damaged or corrupted files (or add ">checkdata.txt" to the end of the preceding command string to save the output to a file in your current directory named "checkdata.txt". The link on repair I provided earlier indicates that free graphics program IrfanView will happily repair (some) corrupted files simply by opening them and then saving them as the same file type inside that application.
    HTH,
    --Ed--
     
    EdTittel, Jul 31, 2017
    #10
  11. rivre Win User
    Big thanks for the tutorial. I just tried it and it worked just as you described.

    I also managed to find a copy of Bad Peggy 2.0 from archive.org, though sadly they didn't archive the last version, 2.1, which is unfortunate because 2.1 didn't require java to be installed to run, whereas all previous versions did. I've been digging around but can't find v2.1 archived anywhere.

    Thanks again for explaining pngchk's usage. The command line has always been intimidating to me. I bet there's a simple way to write a batch file (say, "pngchk.bat") to point at a single directory (say, "test") for the test images and then just by running the batch file it runs pngcheck against that folder. I just don't know how to put together a batch file. I know it's just a simple text file, but I don't know how to format the commands to run it correctly. Any idea how I would write up a quick batch file to accomplish this task? You seem to be knowledgeable with these things. Once it was written, I could always change the directories in the batch file as necessary.
     
    rivre, Jul 31, 2017
    #11
  12. rivre Win User
    Okay, I just put together a quick batch file I can drop in any folder that runs pngcheck and checks the png files in whichever folder the batch file resides in. Here it is in case anybody else finds it useful:

    Code: @ECHO OFF SETLOCAL C:\Programs\pngcheck\pngcheck.exe *.png PAUSE ENDLOCAL[/quote]
    Just copy the text into a text file and save it with the extension .bat and run it in the directory that contains your .png files. Just change the location of pngcheck.exe in the text to wherever you have pngcheck.exe on your system . This displays the results in the cmd window. I also made a second batch file that outputs the results to a text file instead of displaying in the cmd box:

    Code: @ECHO OFF SETLOCAL C:\Programs\pngcheck\pngcheck.exe *.png >checkdata.txt ENDLOCAL[/quote]
     
    rivre, Jul 31, 2017
    #12
  13. dalchina New Member

    Testing pdf files for corruption

    dalchina, Jul 31, 2017
    #13
  14. rivre Win User
    Thanks for the link. Unfortunately that's for version 1.51. I had already found v2.0 off archive.org, but the last version was 2.1, which was an important update because that final update allows the software to run without installing Java. All previous versions require java to run. Unfortunately archive.org never archived the final version.
     
    rivre, Aug 3, 2017
    #14
  15. dalchina New Member
    dalchina, Aug 3, 2017
    #15
Thema:

Testing pdf files for corruption

Loading...
  1. Testing pdf files for corruption - Similar Threads - Testing pdf files

  2. PDF Files corrupted after a long path copy

    in Windows 10 Gaming
    PDF Files corrupted after a long path copy: Hi Guys, I am having a problem with my .pdf files and when I copy them in a long path then they turn into corrupted files ! Well I wanna put everything in order in my computer and well it needs a lot of foldering but when I copy a pdf file which requires long path copying,...
  3. PDF Files corrupted after a long path copy

    in Windows 10 Software and Apps
    PDF Files corrupted after a long path copy: Hi Guys, I am having a problem with my .pdf files and when I copy them in a long path then they turn into corrupted files ! Well I wanna put everything in order in my computer and well it needs a lot of foldering but when I copy a pdf file which requires long path copying,...
  4. Cannot delete corrupted PDF file.

    in Windows 10 Network and Sharing
    Cannot delete corrupted PDF file.: Cannot delete corrupted PDF file. Tried with Safe Mode and Admin DOS prompt. Command DIR listed the file but command DEL or DEL /F /Q /A returns: "The system cannot find the path specified."...
  5. Cannot delete corrupted PDF file.

    in Windows 10 Gaming
    Cannot delete corrupted PDF file.: Cannot delete corrupted PDF file. Tried with Safe Mode and Admin DOS prompt. Command DIR listed the file but command DEL or DEL /F /Q /A returns: "The system cannot find the path specified."...
  6. Cannot delete corrupted PDF file.

    in Windows 10 Software and Apps
    Cannot delete corrupted PDF file.: Cannot delete corrupted PDF file. Tried with Safe Mode and Admin DOS prompt. Command DIR listed the file but command DEL or DEL /F /Q /A returns: "The system cannot find the path specified."...
  7. Corrupted PDF file download from yahoo mail in chrome

    in Windows 10 Network and Sharing
    Corrupted PDF file download from yahoo mail in chrome: this problem occurred only once i try to download 3 PDF files in chrome from yahoo mail which i receive in single email i tried both to download all 3 files individually and together as one zip file none of the files opened in Foxit Reader, Edge Browser and Chrome,...
  8. Corrupted PDF recovery

    in Windows 10 Ask Insider
    Corrupted PDF recovery: Hey guys can you help me solve a problem, there is ton of tutorials in the web about recovering corrupted pdf but in my situation, I do not posses that said file because it is in my friends flash drive. Due to the Covid-19 pandemic, there is no way for us to see each other...
  9. Corrupted PDF file downloaded from yahoo mail

    in Windows 10 Support
    Corrupted PDF file downloaded from yahoo mail: i downloaded PDF file from yahoo mail, using Edge browser, the file couldnt be opened in Foxit PDF reader or google chrome however it was displayed fine in Edge 150328
  10. PDF files get corrupted automatically without any reason

    in Windows 10 Installation and Upgrade
    PDF files get corrupted automatically without any reason: Hi everyone, My project files stored in hard drive (as PDF format) was automatically get corrupt, then i have deleted all corrupt files & replace it from my backup but after few months again all the files were corrupted. I have attached the message displayed when i was...