Posts: 5,446
Threads: 696
Joined: May 2013
Reputation:
0
I can't figure out how to word this for a Google search, so thought I'd ask the Automator gurus here. One of my tasks at work is to place anywhere from 10-50 orders for a particular part at the end of each day. Instead of wasting that much paper and ink, I save the confirmations as PDFs and place them on a server for all to view. Now, each of these PDFs have a particular 5-digit part number that is unique to our system. I could copy and paste, I could retype, but since the number is there on every page already, is there any way to get Automator or something similar to pull that number and save the file under that? Since Leopard is very good about indexing PDFs, it doesn't really matter for me as I can find each one rather quickly through Spotlight. However, I'm the only Mac user. Everyone else just sees the serialized numbers (1...2...3) under the folder date (122108). Any ideas?
Posts: 48,066
Threads: 9,823
Joined: Dec 2021
Reputation:
0
I don't know how to do it, but what you could do is to save each PDF as a date-time file, for example 2008-12-21-19-26-30.pdf, that would be today's date at 7:26 PM (and 30 seconds). If there is at least 1 second between those orders, the files should not overlap. This can be done in Automator, you could even replace the "Save PDF to Web Receipts" plug in to do exactly this.
would that work?
Posts: 5,446
Threads: 696
Joined: May 2013
Reputation:
0
That unfortunately doesn't help the PC users wanting to pull the .PDF based on the five-digit number (our internal house number).
Posts: 2,129
Threads: 203
Joined: Oct 2024
Reputation:
0
What app is creating the PDF files?
Posts: 5,446
Threads: 696
Joined: May 2013
Reputation:
0
Firefox. File>print>save as PDF
Posts: 13,726
Threads: 599
Joined: Nov 2024
Reputation:
0
Saving PDFs from FireFox in that manner gets the file name from the HTML document's
tag. All you need is a Greasmonkey script or a bookmarklet that changes the title on the fly. I'm guessing the part # is part of the url's query string or resides in a javascript-accessible node within the document. It's probably trivial to do.
Posts: 5,446
Threads: 696
Joined: May 2013
Reputation:
0
Hmm... coding is not my thing! But yes, the title of the document comes from the header of the page. It's the same for each one, the title of the vendor. I just add a 1, 2, 3... to the end of the title to save multiple PDF's in one folder. If I could get the default to save as the house number instead, that would be stellar.
It looks like there is an identifiable part of the page source that determines the house number. Here's a snippet:
"input type="hidden" name="part_no" value="888888"
where 888888 is a test house number. It appears in five total places, and is entered up to two different places on the ordering page.
Posts: 5,446
Threads: 696
Joined: May 2013
Reputation:
0
OMG! You freaking rock! Thank you so much!
Posts: 48,066
Threads: 9,823
Joined: Dec 2021
Reputation:
0
so did you install greasemonkey, or you just put this bookmark?