Can't overwrite file after OCR
Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan
-
- User
- Posts: 5
- Joined: Tue Aug 31, 2010 1:08 pm
Can't overwrite file after OCR
Hi there, I'm very new to PDFTools and am trying to add an OCR layer to existing PDF files, so I don't want to rename the files in any way. When I run the tool I get an error message at the end saying "The process cannot access the file because it is being used by another process". I've attached a screenshot so you can see what I mean.
Any clue what I'm doing wrong?
Thanks... Peter
Any clue what I'm doing wrong?
Thanks... Peter
- Paul - Tracker Supp
- Site Admin
- Posts: 6901
- Joined: Wed Mar 25, 2009 10:37 pm
- Location: Chemainus, Canada
- Contact:
Re: Can't overwrite file after OCR
Hi TheRealFentonius,
thanks for the post. There are tools available that we can use to determine exactly what has a handle on that file keeping it open. Before we go there I would ask you to check that you do not have Windows Explorer open to that target folder, and that the file in question is not being previewed in the Windows Explorer Preview Pane. That has the potential to cause this.
If you are absolutely certain that noting is using that file other than PDDF-Tools you can download a copy of "process Explorer" from Microsoft and we can walk you through using it to determine what is locking those files. https://docs.microsoft.com/en-us/sysint ... s-explorer
I am keen first however to know if the Windows file explorer is previewing that file.
regards
thanks for the post. There are tools available that we can use to determine exactly what has a handle on that file keeping it open. Before we go there I would ask you to check that you do not have Windows Explorer open to that target folder, and that the file in question is not being previewed in the Windows Explorer Preview Pane. That has the potential to cause this.
If you are absolutely certain that noting is using that file other than PDDF-Tools you can download a copy of "process Explorer" from Microsoft and we can walk you through using it to determine what is locking those files. https://docs.microsoft.com/en-us/sysint ... s-explorer
I am keen first however to know if the Windows file explorer is previewing that file.
regards
Best regards
Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
-
- User
- Posts: 2394
- Joined: Wed Jan 18, 2006 12:10 pm
Re: Can't overwrite file after OCR
Hi all,
For me, it seems like the problem comes from the "Batch Processing Mode" that is not activated.
Please turn in ON and try again.
Best regards.
For me, it seems like the problem comes from the "Batch Processing Mode" that is not activated.
Please turn in ON and try again.
Best regards.
- Attachments
-
- PDF-XChange Tools - OCR Pages.png (8.52 KiB) Viewed 2126 times
-
- User
- Posts: 5
- Joined: Tue Aug 31, 2010 1:08 pm
Re: Can't overwrite file after OCR
Great, turning on batch processing worked - thanks for the assist...
Peter
Peter
-
- User
- Posts: 5
- Joined: Tue Aug 31, 2010 1:08 pm
Re: Can't overwrite file after OCR
Sorry, I spoke too soon.
I created a new tool which OCRed and then converted to PDF/A, called unoriginally "OCR & PDF/A". When I run this tool with both Batch Processing and Multi-Threaded Processing turned on, then I get the same error message when trying to save. Again, here's a screenshot...
I created a new tool which OCRed and then converted to PDF/A, called unoriginally "OCR & PDF/A". When I run this tool with both Batch Processing and Multi-Threaded Processing turned on, then I get the same error message when trying to save. Again, here's a screenshot...
-
- User
- Posts: 5
- Joined: Tue Aug 31, 2010 1:08 pm
Re: Can't overwrite file after OCR
Obviously (!) the last try was with all Windows Explorer windows shut. I've downloaded Process Explorer - what now?
Here's a shot of the Process Explorer window.
Here's a shot of the Process Explorer window.
-
- User
- Posts: 2394
- Joined: Wed Jan 18, 2006 12:10 pm
Re: Can't overwrite file after OCR
I did run a few tests and the problem comes from the "Convert to PDF/A" action.
When you run it separately, saving to the original file, you get the same error message.
I do not know if it is normal or not that - when using this action - the existing file cannot be overwritten by PDF-XChange Tools.
PDF-XChange Editor has no problem with that.
@Tracker Support : do you have an explanation for this different behavior ?
A work-around would be to save the PDF/A files with another name, like shown by default => %[FileName]_(PDFA)
When you run it separately, saving to the original file, you get the same error message.
I do not know if it is normal or not that - when using this action - the existing file cannot be overwritten by PDF-XChange Tools.
PDF-XChange Editor has no problem with that.
@Tracker Support : do you have an explanation for this different behavior ?
A work-around would be to save the PDF/A files with another name, like shown by default => %[FileName]_(PDFA)
- Paul - Tracker Supp
- Site Admin
- Posts: 6901
- Joined: Wed Mar 25, 2009 10:37 pm
- Location: Chemainus, Canada
- Contact:
Re: Can't overwrite file after OCR
Thanks for that Willy,
TheRealFentonius, I asked the devs about this and it seems we need to reproduce this to investigate, it does seem like PDF-Tools may be blocking that.
May I ask you to export the Tool you created and send it to us at support@pdf-xchange.com please?
regards
TheRealFentonius, I asked the devs about this and it seems we need to reproduce this to investigate, it does seem like PDF-Tools may be blocking that.
May I ask you to export the Tool you created and send it to us at support@pdf-xchange.com please?
regards
Best regards
Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
-
- User
- Posts: 5
- Joined: Tue Aug 31, 2010 1:08 pm
Re: Can't overwrite file after OCR
Thanks Willy & Paul, I've sent the exported tool to the support email, so I guess we'll see what they come back with. Out of interest I tried to change the order of operation within the created tool and it made absolutely no difference!
- Paul - Tracker Supp
- Site Admin
- Posts: 6901
- Joined: Wed Mar 25, 2009 10:37 pm
- Location: Chemainus, Canada
- Contact:
Re: Can't overwrite file after OCR
Hi again TheRealFentonius,
I tested your tool here and every time it saves without issue. Can you reproduce this on any other devices or is it specific to this one PC?
If we cannot reproduce the issue we would need to do a remote debug session on your machine to determine what is happening. It was pointed out to me that while Process Explorer MAY help, it is entirely possible that the lock(s) on the files may be temporary and gone by the time you look with Process Explorer.
So please do let us know if the issue can be reproduced and if so please provide steps how to do it as I was unable to do so.
regards
I tested your tool here and every time it saves without issue. Can you reproduce this on any other devices or is it specific to this one PC?
If we cannot reproduce the issue we would need to do a remote debug session on your machine to determine what is happening. It was pointed out to me that while Process Explorer MAY help, it is entirely possible that the lock(s) on the files may be temporary and gone by the time you look with Process Explorer.
So please do let us know if the issue can be reproduced and if so please provide steps how to do it as I was unable to do so.
regards
Best regards
Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
-
- User
- Posts: 2394
- Joined: Wed Jan 18, 2006 12:10 pm
Re: Can't overwrite file after OCR
Hi Paul,
Thanks for being prepared to further investigate this problem.
I would like to make clear that you should be able to reproduce the problem when you save the file to the same location AND with the same filename. This means that the resulting PDF must overwrite the original file. See screenshot with error message.
I think that PDF-Tools does not close the original document (or does not wait until it is closed) before writing the new PDF.
Best regards.
Thanks for being prepared to further investigate this problem.
I would like to make clear that you should be able to reproduce the problem when you save the file to the same location AND with the same filename. This means that the resulting PDF must overwrite the original file. See screenshot with error message.
I think that PDF-Tools does not close the original document (or does not wait until it is closed) before writing the new PDF.
Best regards.
- Vasyl-Tracker Dev Team
- Site Admin
- Posts: 2353
- Joined: Thu Jun 30, 2005 4:11 pm
- Location: Canada
Re: Can't overwrite file after OCR
Hi Willy.
Please try the latest 353 build. Thanks.
Cheers.
Please try the latest 353 build. Thanks.
Cheers.
Vasyl Yaremyn
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
- Paul - Tracker Supp
- Site Admin
- Posts: 6901
- Joined: Wed Mar 25, 2009 10:37 pm
- Location: Chemainus, Canada
- Contact:
Re: Can't overwrite file after OCR
For the benefit of those reading this, the issue was further investigated with the discussion via email.
I hope that helps."The process cannot access the file because it is being used by another process" issue, the devs found the cause and have made a fix. which will be available in our next build (9.0.355.0).
As a work around you may try to use:
MultiThreaded=OFF and BatchProcessing=ON
OR
MultiThreaded=ON and BatchProcessing=OFF
but NOT the combination:
MultiThreaded=ON and BatchProcessing=ON
Best regards
Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
Re: Can't overwrite file after OCR
Hello Everybody
I was able to locate the problem in batch processing mode. Because we had the same problem at our company.
When the Batch Processing Mode is turned on, each tool action will process every input object (files, scanned images, etc.) before moving on to the following action.
Of course, this can lead to obstructions during one or more sequences of processes that are running at the same time.
Thus the processes can interfere with each other, which leads to the message "The process cannot access the file because it is being used by another process".
Especially when you have several documents that you want to process, an error occurs.
My recommendation is to turn off the "Batch processing Mode"
Thus, each process is completed in turn until it moves to the next process.
Another option would be not to overwrite the document and save as a new document created with a different name.
I was able to locate the problem in batch processing mode. Because we had the same problem at our company.
When the Batch Processing Mode is turned on, each tool action will process every input object (files, scanned images, etc.) before moving on to the following action.
Of course, this can lead to obstructions during one or more sequences of processes that are running at the same time.
Thus the processes can interfere with each other, which leads to the message "The process cannot access the file because it is being used by another process".
Especially when you have several documents that you want to process, an error occurs.
My recommendation is to turn off the "Batch processing Mode"
Thus, each process is completed in turn until it moves to the next process.
Another option would be not to overwrite the document and save as a new document created with a different name.
- Tracker Supp-Stefan
- Site Admin
- Posts: 17945
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: Can't overwrite file after OCR
Hello Eymann,
Many thanks for the post and suggestion!
@TheRealFentonius - please let us know if that resolves the problem for you?
Kind regards,
Stefan
Many thanks for the post and suggestion!
@TheRealFentonius - please let us know if that resolves the problem for you?
Kind regards,
Stefan
- Vasyl-Tracker Dev Team
- Site Admin
- Posts: 2353
- Joined: Thu Jun 30, 2005 4:11 pm
- Location: Canada
Re: Can't overwrite file after OCR
Hello All.
Since 355 build this trouble is solved and you don't need to disable the BatchProcessing option anymore, as workaround.
Please try latest build and let us know if something is wrong...
Cheers.
Since 355 build this trouble is solved and you don't need to disable the BatchProcessing option anymore, as workaround.
Please try latest build and let us know if something is wrong...
Cheers.
Vasyl Yaremyn
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.