• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

PDF of invoices to sort, batch, print, if possible?

Community Beginner ,
Feb 23, 2021 Feb 23, 2021

Copy link to clipboard

Copied

Hello,

 

I have a large PDF (8000+ pages). In its original form the front is an invoice and the reverse is standard wording. I'm wondering if the following is possible. If so, what order is the best way to sort, batch and print:

 

  1. Sort invoices by Account and Invoice # into two (2) batches
    1. Single invoices (Account with one (1) invoice)
    2. Multiple invoices (Account with multiple invoices)
  2. Add reverse page standard wording (if necessary, to remove before batching)
  3. Print batches
    1. Single invoices
    2. Multiple invoices with a separator page per account #

 

I was able to remove the reverse standard wording using JavaScript I found online, now I'm looking for the rest of the solution to batch and add the standard wording before printing the invoices.

 

 

TOPICS
Edit and convert PDFs , General troubleshooting , JavaScript , Scan documents and OCR

Views

1.6K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 23, 2021 Feb 23, 2021

Copy link to clipboard

Copied

This might be possible, but will require a custom-made script. The script will have to be able to identify where each record begins, and where it ends (since they are not all of the same length). It will also have to find a way of extracting the account and invoice numbers, based on their location on the page, or on a textual pattern (for example, if they are always preceded by same text, like "Account Number: XXXXX").

In addition, sorting the pages once this information has been found is not a trivial task. I usually prefer creating a new file and add the pages to it in the sorted order, instead of sorting the original file. It's a bit less efficient, but much easier to code.

All of the above requires a high level of Acrobat JS knowledge and experience.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 23, 2021 Feb 23, 2021

Copy link to clipboard

Copied

Thanks for the reply - I figured it would require a custom script; unfortuantely, I'm not an expert in JS, but I am willing to learn and able to solve problems (with help of course). Luckily the invoices have a standard format, the account and invoice # are always in the same location on the page.

 

Do you have a reccomended guide on JS for Adobe Pro?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 23, 2021 Feb 23, 2021

Copy link to clipboard

Copied

Here are some good resources:

General JS tutorial (note that only the core syntax applies to Acrobat):

http://www.w3schools.com/js/default.asp

Homepage for Acrobat JavaScript development, including a link to the full API:

http://www.adobe.com/devnet/acrobat.html

Free tutorials about Acrobat in general, including many JS related ones: https://acrobatusers.com/tutorials/

A paid-for website with tutorials about Acrobat JavaScript (not related to me): http://www.pdfscripting.com/

My humble web-site with many tools for Acrobat (mostly paid-for, some free): https://try67.com

 

If you're interested in hiring a professional to create this script for you feel free to contact me privately via [try6767 at gmail.com] to discuss it further.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 23, 2021 Feb 23, 2021

Copy link to clipboard

Copied

Excellent! Thanks for the help and info everyone!

I'll review everything and let everyone know where am at.

🙂

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 23, 2021 Feb 23, 2021

Copy link to clipboard

Copied

This can very likely be done  - as long as you can get all the words on the PDF page. You would need to use the doc.getPageNthWord() method to enumerate all words on the page to find the account and invoice number information. See here for more information about this method: https://help.adobe.com/en_US/acrobat/acrobat_dc_sdk/2015/HTMLHelp/index.html#t=Acro12_MasterBook%2FJ...

 

I've successfully done what you describe, but it's a lot of work. One thing that helps to cut down on processing time is to crop the page to just the section where you expect the account and invoice information to be, and then search for the information, followed by reversing the crop function. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 23, 2021 Feb 23, 2021

Copy link to clipboard

Copied

This gives me hope! Thank you! I'll continue to search, read and sort out a solution. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 23, 2021 Feb 23, 2021

Copy link to clipboard

Copied

You mentioned above that you are not an experience JavaScript programmer. You may want to take some time to learn. Here is a cheap and hopefully easy way to get started: http://khkonsulting.com/2017/01/learning-to-program-javascript-for-adobe-acrobat/

Here is something else that might help you to get started: http://khkonsulting.com/2014/04/extract-pdf-pages-based-content/

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 03, 2021 Mar 03, 2021

Copy link to clipboard

Copied

Evermaps's Auto Split Pro solved it! 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 03, 2021 Mar 03, 2021

Copy link to clipboard

Copied

I am glad you found a solution. I've not used the Evermap tools in a long time, and I forgot that that was still available. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 03, 2021 Mar 03, 2021

Copy link to clipboard

Copied

LATEST

I tried A-PDF's split program, although it has a decent GUI, it take 12+ hours to split a 38mb PDF containing 8300 double sided pages - but it didn't include a merge function and Adobe can't natively handle 500+ files at a time; Evermap split the same PDF in 5min and merged them in 45s.

 

And at least by using Evermap others can use it for more than just one type of invoice I have it currently setup for; the cost is low and benefit is high is using Evermap.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines