<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Why is &amp;quot;updateDocSecurity()&amp;quot; is not running as documented? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/why-is-quot-updatedocsecurity-quot-is-not-running/m-p/1211340#M65527</link>
    <description>&lt;P&gt;I tried it with the four parameters in the first example because that's how I saw in the example block on the documentation page. But yeah probably doesn't need that perimeter at all.&lt;/P&gt;&lt;P&gt;I have tried different variations of the passwords, also excluding only the master password or excluding only the user password. I still get the tool spinning forever.&lt;/P&gt;</description>
    <pubDate>Sat, 10 Sep 2022 01:27:01 GMT</pubDate>
    <dc:creator>JoshMakesMaps</dc:creator>
    <dc:date>2022-09-10T01:27:01Z</dc:date>
    <item>
      <title>Why is "updateDocSecurity()" is not running as documented?</title>
      <link>https://community.esri.com/t5/python-questions/why-is-quot-updatedocsecurity-quot-is-not-running/m-p/1211244#M65523</link>
      <description>&lt;P&gt;updateDocSecurity() doesn't seem to be &lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/pdfdocument-class.htm" target="_blank" rel="noopener"&gt;documented&lt;/A&gt; correctly and is not executing as expected in these scenarios:&lt;/P&gt;&lt;UL class="lia-list-style-type-lower-alpha"&gt;&lt;LI&gt;Running&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;pdfDoc.updateDocSecurity("123456", "123456", "RC4", "OPEN")​&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;returns this error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;TypeError: updateDocSecurity() takes from 2 to 4 positional arguments but 5 were given​&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Running&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;pdfDoc.updateDocSecurity("123456", "123456", "RC4")​&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;results in the process running forever.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Running&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;pdfDoc.updateDocSecurity("", "", "RC4")​&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;results in the process running successfully.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea what's going on?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ArcGIS Pro 2.8.3&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2022 19:07:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-is-quot-updatedocsecurity-quot-is-not-running/m-p/1211244#M65523</guid>
      <dc:creator>JoshMakesMaps</dc:creator>
      <dc:date>2022-09-09T19:07:04Z</dc:date>
    </item>
    <item>
      <title>Re: Why is "updateDocSecurity()" is not running as documented?</title>
      <link>https://community.esri.com/t5/python-questions/why-is-quot-updatedocsecurity-quot-is-not-running/m-p/1211338#M65526</link>
      <description>&lt;P&gt;python 3.0 documentation states with named parameters.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;updateDocSecurity (new_master_password, {new_user_password}, {encryption})&lt;/LI-CODE&gt;&lt;P&gt;or with your listing&lt;/P&gt;&lt;LI-CODE lang="python"&gt;pdfDoc.updateDocSecurity(new_master_password="123456",
                         new_user_password="654321",
                         encryption="RC4")&lt;/LI-CODE&gt;&lt;P&gt;I suspect if the new user and master password are the same it will spin.&lt;/P&gt;&lt;P&gt;Change the first 2 parameters to suit.&lt;/P&gt;&lt;P&gt;Your first example failed because there is no 4th parameter (eg "OPEN" )&lt;/P&gt;</description>
      <pubDate>Sat, 10 Sep 2022 01:15:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-is-quot-updatedocsecurity-quot-is-not-running/m-p/1211338#M65526</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2022-09-10T01:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: Why is "updateDocSecurity()" is not running as documented?</title>
      <link>https://community.esri.com/t5/python-questions/why-is-quot-updatedocsecurity-quot-is-not-running/m-p/1211340#M65527</link>
      <description>&lt;P&gt;I tried it with the four parameters in the first example because that's how I saw in the example block on the documentation page. But yeah probably doesn't need that perimeter at all.&lt;/P&gt;&lt;P&gt;I have tried different variations of the passwords, also excluding only the master password or excluding only the user password. I still get the tool spinning forever.&lt;/P&gt;</description>
      <pubDate>Sat, 10 Sep 2022 01:27:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-is-quot-updatedocsecurity-quot-is-not-running/m-p/1211340#M65527</guid>
      <dc:creator>JoshMakesMaps</dc:creator>
      <dc:date>2022-09-10T01:27:01Z</dc:date>
    </item>
    <item>
      <title>Re: Why is "updateDocSecurity()" is not running as documented?</title>
      <link>https://community.esri.com/t5/python-questions/why-is-quot-updatedocsecurity-quot-is-not-running/m-p/1211342#M65528</link>
      <description>&lt;P&gt;Using named parameters, as in my example, ensures that you have the correct parameter names.&lt;/P&gt;&lt;P&gt;The first parameter is required and must be known.&lt;/P&gt;&lt;P&gt;The second parameter is optional and its default is None.&lt;/P&gt;&lt;P&gt;If it is spinning, check your first parameter&lt;/P&gt;</description>
      <pubDate>Sat, 10 Sep 2022 02:13:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-is-quot-updatedocsecurity-quot-is-not-running/m-p/1211342#M65528</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2022-09-10T02:13:57Z</dc:date>
    </item>
    <item>
      <title>Re: Why is "updateDocSecurity()" is not running as documented?</title>
      <link>https://community.esri.com/t5/python-questions/why-is-quot-updatedocsecurity-quot-is-not-running/m-p/1212003#M65539</link>
      <description>&lt;P&gt;It's still spinning forever after adjusting the script:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# Update PDF security.
            pdfDoc.updateDocSecurity(new_master_password="password123")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;and&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# Update PDF security.
            pdfDoc.updateDocSecurity("password123")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2022 15:03:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-is-quot-updatedocsecurity-quot-is-not-running/m-p/1212003#M65539</guid>
      <dc:creator>JoshMakesMaps</dc:creator>
      <dc:date>2022-09-13T15:03:31Z</dc:date>
    </item>
    <item>
      <title>Re: Why is "updateDocSecurity()" is not running as documented?</title>
      <link>https://community.esri.com/t5/python-questions/why-is-quot-updatedocsecurity-quot-is-not-running/m-p/1212187#M65553</link>
      <description>&lt;P&gt;Tech Support is your best bet.&amp;nbsp; I can't find anything listed on the public support site.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2022 20:39:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-is-quot-updatedocsecurity-quot-is-not-running/m-p/1212187#M65553</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2022-09-13T20:39:22Z</dc:date>
    </item>
  </channel>
</rss>

