Dear AutoIt Community,
I have a lot of PDFs that I want to rename from a regex of the individual docs. My plan was to write a loop to go through them all, have AutoIt read the PDF text and then with regex rip out the text I want and rename the PDF accordingly.
Did the usual things, AutoIt forum search, Google search. The most promising approach I've found was to use pdftotext to have AutoIt read the PDF. Went here to download it and it seems to me like you just extract the .zip. Had a read of pdftotext.txt and thought I had it.
I then had a go trying to get my code working with pdftotext but can't seem to figure it out and get it working.
Here's the latest mutation of my code:
#include <File.au3> $sPdfToTextPath = "C:\Program Files (x86)\Xpdf\bin32\pdftotext.exe" $sOutPutFilePath = "C:\Users\MyPC\Documents\TheFolderIPutItIn\File.txt" $hFile = _FileCreate($sOutPutFilePath) $sPdfFile = "C:\Users\MyPC\Documents\TheFolderIPutItIn\Pdf.pdf" $sRunWait = " " & $sPdfToTextPath & " " & $sPdfFile & " " & $sOutPutFilePath RunWait($sRunWait) ShellExecuteWait($sOutPutFilePath) ;see the text content FileClose($hFile) Exit
Is this a Windows 8 x64 thing? If so is there a work around? If not what have I missed here?
I'm aware I could spend about $100 for some solution but I don't want to spend the money if I can just code it and learn something in the process. I'm also aware the guy from this website posted an exe on AutoIt forum that will do this, however I don't want to run code that I can't trust or look at.
Any help greatly appreciated and thanks for any help in advance.