Page 1 of 1
Rename files with text extracted from a fixed position in PDF
Posted: Fri Apr 04, 2014 5:04 pm
by mervinator
Is this doable in Switch and/or Pitstop Server?
There are interactive solutions for this using third party software like Evermap Autobatch and Easy PDF Renamer but I am looking for something that is totally hands-free and silently runs in the background.
Rename files with text extracted from a fixed position in PDF
Posted: Fri Apr 04, 2014 5:11 pm
by dkelly
I've implemented several flows like this using Apago PDFspy
Rename files with text extracted from a fixed position in PDF
Posted: Fri Apr 04, 2014 6:40 pm
by mervinator
Hi Dwight, I downloaded the PDFspy trial but the switch configurator properties don't seem to offer a clue on how to go about extracting the text I want. So I guess it's not as straightforward as I hoped it would be. Is it just PDFspy or PDFspy + enormous amount of scripting that's required to do this?

Rename files with text extracted from a fixed position in PDF
Posted: Fri Apr 04, 2014 8:31 pm
by dkelly
You need a script to call PDFspy and process the text it extracts. Here's an example flow that does what you want.
https://www.dropbox.com/s/z8r32w7d9ed8u ... text.sflow
Cheers,
Dwight Kelly
Rename files with text extracted from a fixed position in PDF
Posted: Wed Oct 22, 2014 8:46 am
by lombert
dkelly wrote: You need a script to call PDFspy and process the text it extracts. Here's an example flow that does what you want.
Hi Dwight
How can I use this script, I have PDFSpy, but can't understand were in the pdf it looks for the text string? I tried to put a text string in the left bleed, but it didn't work.
I need to rename some impositions pdf and I think your script can help me..
/Thomas
Rename files with text extracted from a fixed position in PDF
Posted: Wed Oct 22, 2014 4:45 pm
by dkelly
The property "Marker" is a regular expression that the script uses to locate the text on the page. The original flow had "Job#" so the script searches for "Job#" and then extracts the text after that and before the next white space.
So, "Job# 1234" would extract "1234"
It stores this value in the job's private data using the name "ExtractedName".
Rename files with text extracted from a fixed position in PDF
Posted: Fri Oct 24, 2014 8:56 am
by lombert
Thanks!
I have tested and I get this error:
"10/24/14 8:50 AM,Error,PDFspy text search,Rename using PDF text,PDFspy text search,39P41,340137 100 ex IF dfgdfgd.pdf,Could not extract text from PDF"
I'll guess that when it says that it can't find the "Job#" text?
EDIT: Now I got it to run. But my output file is named "Job#.pdf"?? That is wrong?
EDIT 2: NOW IT WORKS!!

I needed to have a 'blank space' after the name to.. "Job# 1234 "
Rename files with text extracted from a fixed position in PDF
Posted: Fri Oct 24, 2014 3:28 pm
by dkelly
Obviously you can customize the text to find, eg. Job#, to your specific requirements.
Rename files with text extracted from a fixed position in PDF
Posted: Fri Oct 31, 2014 7:24 am
by ArielRauch
@Dwight,
would ApagoSpy also recognize Hebrew words (right-to-left + character set)?
Rename files with text extracted from a fixed position in PDF
Posted: Fri Oct 31, 2014 4:45 pm
by dkelly
It's possible but in the file I just tried the Hebrew characters were images not glyphs.