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

Delaying batch processing of scanned files

Participant ,
Nov 24, 2018 Nov 24, 2018

Hi,

I was wondering if there is a way to pause or delay script in batch sequence of acrobat. I have tried app.setInterval, app.setTimeOut but in both case app go to read next lines. timeout or interval script does not get a chance to run because action for current files finishes before timeout time reach and batch action proceed to next file without dialog being executed.. I have tried setting it very low.

Let me give more details, I am working on the scanned files. with batch sequence, when batch sequence open first/any file a dialog box appear to allow input a ref no from the scanned image but since document view is not clear and one cannot read the number from screen. See attached.

While document view is expected to look as. I need to read the red marked area. Is there any way to do this?

Thank you

TOPICS
Acrobat SDK and JavaScript
1.3K
Translate
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
LEGEND ,
Nov 24, 2018 Nov 24, 2018

Maybe you need a way to turn off these prompts globally, such as a variable you might set in a startup script.

Translate
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
Participant ,
Nov 24, 2018 Nov 24, 2018

I am not sure how that could help.

Some more info, probably should write this in question. When scanned pdf is opened as a file during batch process, image is not loaded properly and immediately custom dialog appears for input. I don't want to turn prompts off because I need to input reference number. Because image is not loaded clearly it is appearing as white in half area and I cannot read from image.

When last file is reached in action , file appears clear visible and dialog appears after 3 sec which is set. But for all earlier files dialog does run and appear.

Translate
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 ,
Nov 25, 2018 Nov 25, 2018

Where does you execute the custom dialog?

Translate
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
Participant ,
Nov 25, 2018 Nov 25, 2018

Custom dialog is in stamp form field and I'm initiating stamp from  batch processing.

Translate
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 ,
Nov 25, 2018 Nov 25, 2018

How did add the stamp?

Translate
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
Participant ,
Nov 25, 2018 Nov 25, 2018

I'm using

this.addAnnot({page: 0,type: "Stamp",author: " arvind",name: "STP",rect: [0, 0, 41, 21],AP: "#StampName,ALDI-STP" });

And initiating this stamp from app.setTimeOut from batch.

Dialog is in stamp field. Stamp and dialog working fine just display become white and I cannot read from screen.

Translate
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 ,
Nov 25, 2018 Nov 25, 2018

Why do you use setTimeOut?

Translate
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
Participant ,
Nov 25, 2018 Nov 25, 2018

Because I want to delay the dialog prompt so that document is loaded fully and visible. I am allowing more time to load. I am using a function in app.setTimeOut that will apply stamp.

Translate
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 ,
Nov 25, 2018 Nov 25, 2018

I don't think that the delay will help.

Translate
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
Participant ,
Nov 25, 2018 Nov 25, 2018

Please advise what can be done.

Translate
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 ,
Nov 25, 2018 Nov 25, 2018

I don't know.

Translate
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 ,
Nov 26, 2018 Nov 26, 2018

Hi,

I don't think this workflow will work as stated above I think you will always suffer issues with not redrawing correctly.

It may be that we could alter the actual running of the script using different process that would enable you to achieve your aim.

I am not sure what the full Script is doing but we could maybe move it to Visual Basic, by moving to a OLE type process it would enable us to have more control over when things happen, this would hopefully enable us to be able to solve the problem. If you would like to discuss this further please sent me a direct message.

Regards

Malcolm

Translate
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
Participant ,
Nov 26, 2018 Nov 26, 2018

I want to add barcode to scanned files using barcode font. I will input its value reading a number from the same scanned file opened. Also dialog prompt have a checkbox that tell script to copy pdf file to different folder as jpeg if success and to different folder if failed.

I can do it using VB but will acrobat render scanned file properly so that I can read from it?

Thanks

Translate
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 ,
Nov 26, 2018 Nov 26, 2018

Hi,

To be honest I don't know, but  as it gives us more control as we will have to code to handle opening and dealing with each file, it means we can provide a delay that is required to show the file (hopefully). We can also control where the dialog is shown, as  we could show it from VB rather than from the batch.

Regards

Malcolm

Translate
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
Participant ,
Nov 26, 2018 Nov 26, 2018
LATEST

Thanks Malcolm for this idea. I think I can give this a try.

Translate
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