Author Topic: Using Winbatch to Append Scanned Pages in Adobe Acrobat  (Read 82 times)

mjwillyone

  • Newbie
  • *
  • Posts: 9
Using Winbatch to Append Scanned Pages in Adobe Acrobat
« on: November 30, 2018, 12:13:53 pm »
Hello,

I am looking for a way to automate Adobe Acrobat's document scan.  Currently we put in a physical paper folder mail for our employees who are out of the office.  At the end of the month, we scan each employees folder contents, saving it as LastName.FirstInitial.pdf.     Then we email it to them.

I would like to find a way for us to search a list of our employee names, choose the one we want, then scan a document that comes in that day, appending the new scanned pages to the end of the ongoing PDF file.  Can Winbatch "read" a list of employee names and then, based upon the user's choice, open a document with that employee's name on it through Acrobat and append it?

Thanks!
Mike

td

  • Tech Support
  • *****
  • Posts: 2653
    • WinBatch
Re: Using Winbatch to Append Scanned Pages in Adobe Acrobat
« Reply #1 on: November 30, 2018, 01:24:48 pm »
WinBatch can "read" a lot of things.  Whether or not it can read a list of employee names depends on what form the list is in.  For example, WinBatch is not particularly well suited for the task of reading a list that resides on a piece of paper lying on your physical desk.

I have not tried it but it is likely that WinBatch could be used to append information to an existing pdf document without the use of Acrobat. There are examples of creating pdf documents using binary buffers in the Tech Database.

Here is a link to a pure WinBatch script that can be used to create a pdf file:
http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/Samples~from~Users+Text~to~PDF~UDF.txt

You should be able to modify it for appending instead of creating.  There are also numerous open source tools that can be used to modify pdf files.  One or more of those maybe manipulatable or callable from WinBatch.  You would need to do a Web search to find what suits you best.

I image by scanning you are referring to a physical scanner and I am not aware of any WinBatch powered robots that are capable of placing a piece of paper in a machine.  However, you may be able to automate the application that you use to trigger the scan and acquire the scanned document but that would depend on the specific application.
"Success is a lousy teacher. It seduces smart people into thinking they can't lose."
  - Bill Gates


stanl

  • Pundit
  • *****
  • Posts: 808
Re: Using Winbatch to Append Scanned Pages in Adobe Acrobat
« Reply #2 on: December 01, 2018, 07:41:11 am »
Possibly: (1) scan documents into folder with name=employee_id, replace if exists (2) Iterate scanned files, link document to employee database (3) Open [if exists] Master employee PDF then append.   WB can do this with Acrobat Instaled.

td

  • Tech Support
  • *****
  • Posts: 2653
    • WinBatch
Re: Using Winbatch to Append Scanned Pages in Adobe Acrobat
« Reply #3 on: December 02, 2018, 09:08:50 am »
Acrobat Pro does have built-in functionality for scanning documents directly into PDF formatted files and appending PDF formatted content to existing PDF files.  However, automating that process in WinBatch would likely require some probably third party .Net assemblies or something similar.  I don't believe Acrobat directly supports COM Automation objects anymore and the Roboscripter approach would devolve into nothing more than mouse movements, clicks, and keystrokes.  Adobe does offer a PDF SDK and a PDF library.  I haven't used or even looked at either one so I don't have an opinion on how easy it would be to access that bit of functionality directly from a WinBatch script.
"Success is a lousy teacher. It seduces smart people into thinking they can't lose."
  - Bill Gates


stanl

  • Pundit
  • *****
  • Posts: 808
Re: Using Winbatch to Append Scanned Pages in Adobe Acrobat
« Reply #4 on: December 03, 2018, 02:34:24 am »
If the ask is to append a scanned document pdf file to an existing based on an employee lookup, there is vba code to merge pdf files, or use pdfCreator to combine files.

ChuckC

  • Full Member
  • ***
  • Posts: 165
Re: Using Winbatch to Append Scanned Pages in Adobe Acrobat
« Reply #5 on: December 03, 2018, 05:25:28 am »
+$0.02:

Based on some experiences I've had in the past performing some similar automated document scanning / processing / storage, the "weakest link" in the whole process is the process of interacting with the scanner during image acquisition.  Windows is great at making, say, the selection of a printer and sending output to it a very generic process that is readily automated.  However, image acquisition lacks the unified & streamlined functionality.  As a result of this, depending on the application you are using and the particular scanner [and associated software] that you have, that part of the process is going to vary the most.

As others have pointed out, there are many open source software projects that provide PDF file manipulation that you can use.  Also, WinBatch has the flexibility to access spreadsheets, text files [CSV, XML, JSON, etc...] and various SQL database implementations, so looking up a list of employees should be a relatively straight forward thing to achieve.

td

  • Tech Support
  • *****
  • Posts: 2653
    • WinBatch
Re: Using Winbatch to Append Scanned Pages in Adobe Acrobat
« Reply #6 on: December 05, 2018, 09:20:09 am »
Of course, there is always MS Word.  It has COM Automation support, can read pdf documents into Word format, and convert back to pdf.  Can't say that I have tried using WinBatch and Word's COM Automation to read-covert-append-convert-write a pdf document but it might be a viable enough alternative to at least explore. 
"Success is a lousy teacher. It seduces smart people into thinking they can't lose."
  - Bill Gates