Network Automation Software We are currently migrating this forum
over to our HelpSystems domain. Please
post all new threads in our new
HelpSystems Community Portal.
Post to the HelpSystems Forum
You are not currently logged on. You must be logged on in order to post. Log on
Or Create a new account
AutoMate Discussion
Decrease font size
Increase font size
Topic Title: Checking PDFs for password protection
Topic Summary: Inconsistent results
Created On: 06/01/2018 02:13 PM
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
View similar topics View similar topics
View topic in raw text format. Print this topic.
 06/01/2018 02:13 PM
User is offline View Users Profile Print this message

Author Icon
JamesLankford
Artisan (200-499)

Posts: 369
Joined: 11/26/2012

We recently had a project where we converted several thousand PDF documents to another format. During the process, I encountered many with password protection. Unfortunately this stopped the entire batch job until the prompt was acknowledge, which significantly slowed the process.

To help alleviate this, I wrote a quick AM task to check for the existence of a password on the batch of PDFs and to log them to a file.

The good news is that the task correctly identified every PDF that had a password on it. The bad news is that is also flagged many PDFs as having a password, but not actually having one. The results were inconsistent, but every PDF actually having a password was always correctly flagged, I just had to sift out the false positives.

Any thoughts as to why this might be? We finally made it through the conversion, but I suspect we may need to do this again at some point in the future and I'd like to see if this process can be improved.

Thanks,
James

-------------------------
<html />
 06/06/2018 02:05 PM
User is offline View Users Profile Print this message

Author Icon
Alex Escalante
HelpSystems

Posts: 871
Joined: 02/26/2014

Hello James,

Was this ran on 11.0.6? Is it possible to share the action(s) that you are using to check for the passwords?

thanks!

-------------------------

Alex Escalante | Support Analyst
AutoMate | Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700 | F: +1.213.738.7665
 06/06/2018 02:08 PM
User is offline View Users Profile Print this message

Author Icon
JamesLankford
Artisan (200-499)

Posts: 369
Joined: 11/26/2012

No, it was ran on 11.0.1.17. I did not know 11.0.6 had even been released? I just upgraded ours to 11.0.5 last week. How can I get on a notification list for new releases?

But, I have not tested this again since upgrading to 11.0.5, so I will try it again just to make sure I get the same results.

-------------------------
<html />
 06/06/2018 03:11 PM
User is offline View Users Profile Print this message

Author Icon
Ricardo Castaneda
HelpSystems

Posts: 3424
Joined: 01/11/2008

Hello,

The SMC should notify you when you open the SMC (depending on your setting)

Open SMC --> Select Options --> Select Preferences --> Select Check Product Version

We look forward to hear your results.

-------------------------

Ricardo Castaneda | Principal Support Analyst
AutoMate | Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700
 06/08/2018 12:26 PM
User is offline View Users Profile Print this message

Author Icon
JamesLankford
Artisan (200-499)

Posts: 369
Joined: 11/26/2012

Ricardo,

We are running 11.0.5.8. I am not getting a message when I log into the SMC regarding an updated version. When I manually check for updates, the message states we have the most recent version.

Click for full image
Click for larger image



-------------------------
<html />
 06/08/2018 12:45 PM
User is offline View Users Profile Print this message

Author Icon
JamesLankford
Artisan (200-499)

Posts: 369
Joined: 11/26/2012

Ricardo,

It will probably be next month before we upgrade to the latest build, so I decided to go ahead and post my Q&D task for review.




-------------------------
<html />
 06/13/2018 01:05 PM
User is offline View Users Profile Print this message

Author Icon
Alex Escalante
HelpSystems

Posts: 871
Joined: 02/26/2014

Hello James,

Thank you for sharing your task.

I see you have a variable created in step 4, which looks like is a txt file named "PDF Locked", then 15 checks to see if the file is present. How is this file being populated? In other words, where is the check for password protection actually occurring?

-------------------------

Alex Escalante | Support Analyst
AutoMate | Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700 | F: +1.213.738.7665
 06/13/2018 01:17 PM
User is offline View Users Profile Print this message

Author Icon
JamesLankford
Artisan (200-499)

Posts: 369
Joined: 11/26/2012

Hi Alex,

That is correct - that log file gets written to when a password-protected PDF is found.

Step 15 is nothing more than a step to ensure a clean log file is started every time the job runs; if it is found then delete it. It will be recreated if locked PDFs are found.

The password check is being done on step 36 when a session is created. If the session being created is for a PDF that is password protected, it should raise error 45040 and then continue on to the next step where the errorNum variable is evaluated. If errorNum = 45040, then that filename is written to the logFilesLocked variable. On the next loop the errorNum variable is reset to 0 before a new PDF session is created.

Make sense?

-------------------------
<html />
 06/19/2018 10:12 AM
User is offline View Users Profile Print this message

Author Icon
Alex Escalante
HelpSystems

Posts: 871
Joined: 02/26/2014

Hello James,

Is it possible to send us a test pdf that exhibits the behavior? We have been unable to replicate the issue in house.

Please send the pdf to automate.support@helpsystems.com and reference this thread. We will test based on your data.

thank you.

-------------------------

Alex Escalante | Support Analyst
AutoMate | Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700 | F: +1.213.738.7665
 06/19/2018 10:20 AM
User is offline View Users Profile Print this message

Author Icon
JamesLankford
Artisan (200-499)

Posts: 369
Joined: 11/26/2012

Unfortunately no, since it would be considered confidential information. What is the behavior you are seeing?

-------------------------
<html />
Statistics
18258 users are registered to the AutoMate Discussion forum.
There are currently 0 users logged in.
The most users ever online was 5551 on 01/08/2018 at 11:11 AM.
There are currently 532 guests browsing this forum, which makes a total of 532 users using this forum.

FuseTalk Enterprise Edition v4.0 - © 1999-2019 FuseTalk Inc. All rights reserved.

Sitemap Network Automation Software Blog