topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Friday April 19, 2024, 3:38 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - nnebeel [ switch to compact view ]

Pages: [1]
1
Post New Requests Here / Play first x frames, skip to last x frames
« on: November 06, 2013, 12:20 PM »
I have several thousand SWF files. They're all just containers for converted MOV or MP4 movies, and they had to be in SWF format for compatibility with a web interface that only accepts SWF files. When I made the SWF files, I added a fade in and fade out in Flash. I have found that the fade in and fade out are not consistently in the right place, so I'm using MPC-HC to do some QC work on these files. I need to check the first 50-100 frames and the last 50-100 frames. So basically, I need a script or program that does the following:

  • Play the first x frames of the file
  • Go to y frames from the end of the file
  • Play until the end of the file
  • Open the next file in the folder

If there's a way to control MPC-HC like that with SWF files, it might also apply to playing other file formats. If it could go on to the next file in the folder, that would be cool, too. MPC-HC doesn't allow the Play next in folder feature to work with SWF files, though, so it would be okay to just accomplish the first three requirements.

I know this is a pretty specialized need, but it would save me many hours and a lot of headache.

2
skwire, thanks for playing the trump card!  :Thmbsup:

PDFInfoGUI
Export CSV button? Check.
Folder recursion? Check.
Custom PDF file list? Check.
Separate fields for path and file name? Check.
Full document properties? Check.

Best tool I've found this month! Had to come to the experts to find it, though.

Thanks!

3
Thank you all for your input! 4wd, your solution worked great! I only had to tweak it slightly to make it do exactly what I wanted. Here's the code I ended up using:

Code: Text [Select]
  1. REM PDF-Pages.cmd
  2. @echo off
  3. del output.txt
  4. for /r %1 %%f in (*.pdf) do pdfinfo.exe -meta "%%f" >out.txt & echo %%~nxf,| tr.exe -d "\r\n" >>output.txt & find "Pages:" out.txt | tr.exe -d "\055\056\072[:alpha:][:space:]" >>output.txt & echo. >>output.txt
  5. del out.txt

I just changed the output file name so that it would only include the file name instead of the full path, and I deleted the quotes around the file name and the space after the comma so that Excel would handle it more easily. These are obviously minor tweaks. I also realized that a comma might not be the best delimiter here because file names can include commas, too. But that would be easily fixed if I needed to.

Of course, we could also use TR to extract the other fields (if we wanted to), but this is a great solution for me! TR seems very powerful. I haven't had much use for GNU commands before. Now I have some new stuff to play with!

Thank you!

IanB, that sounds like a nifty solution, but I was hoping for something I could use without having to install anything.

x16wda, sure, GREP would work, too.

4
Coding Snack Guidelines / Re: Count Number of Pages in PDF Files
« on: April 30, 2013, 04:52 PM »
You could put either in a batch file for multiple PDFs, but you'd have to massage the output data to make it tidy.

I had looked into using pdfinfo before, but the output would indeed need some massaging. The source code for pdfinfo is at https://github.com/flooved/pdf2image/blob/master/xpdf/pdfinfo.cc. When I use the command pdfinfo -meta [filename], I get the following output:

Code: Text [Select]
  1. Tagged:         no
  2. Form:           none
  3. Pages:          7
  4. Encrypted:      no
  5. Page size:      613 x 790 pts
  6. File size:      339400 bytes
  7. Optimized:      no
  8. PDF version:    1.4

Maybe someone could create a spin-off from this so that, instead of creating a eight-line block of text, it created a single line in a delimited (maybe comma-delimited) text file with column headers in the first line—something like this:

Code: Text [Select]
  1. Tagged,Form,Pages,Encrypted,Page width,Page height,File size,Optimized,PDF Version
  2. none,7,no,613,790,339400,no,1.4

Then it could easily be used in a batch file operation and/or in a GUI.

5
Coding Snack Guidelines / Count Number of Pages in PDF Files
« on: April 30, 2013, 12:27 PM »
I'd like a small program that allows me to select multiple PDF files or a directory with PDF files (recursive) and see the total number of pages across the files.

For example, if I have folder A with ten three-page PDF files and folder B with five five-page PDF files, and I select both folders, the program would display a dialog box with the total number of pages in the PDF files (55 pages).

Optionally, it would be nice to have the program output a delimited text file with the file name, file size, and number of pages, kind of like a DIR command, but with page numbers as an added property. Then I could import it into the database/spreadsheet program of my choice.

CMD or GUI would be fine.

Pages: [1]