Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
Maybe you need a way to turn off these prompts globally, such as a variable you might set in a startup script.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Where does you execute the custom dialog?
Copy link to clipboard
Copied
Custom dialog is in stamp form field and I'm initiating stamp from batch processing.
Copy link to clipboard
Copied
How did add the stamp?
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Why do you use setTimeOut?
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
I don't think that the delay will help.
Copy link to clipboard
Copied
Please advise what can be done.
Copy link to clipboard
Copied
I don't know.
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
Thanks Malcolm for this idea. I think I can give this a try.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now