<?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: Issues with PW protecting a PDF file in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Issues-with-PW-protecting-a-PDF-file/m-p/825752#M25878</link>
    <description>&lt;P&gt;It is very likely that you are running into an issue about what is getting applied to the open ODS destinations when.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did you try Closing the first ODS PDF before the OPTIONS for Pdfsecurity?&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;%macro ReportPlots;
ods _all_ close ;
options pdfsecurity=none;
ods PDF file="U:\Projects\ICECAP\Programs\Greys_Code\Scheduled Programs\Funnels\OPEN\External QC Funnel Plots &amp;amp;asofdt..pdf"   ;

/*BLINDED SET OF GRAPHS*/
ODS PDF CLOSE; /* CLOSE THE FILE BEFORE SETTING THE OPTIONS FOR THE NEXT SECTION*/

options pdfsecurity=low pdfpassword=(owner="Grey", open="Unlinded");
ods PDF file="U:\Projects\ICECAP\Programs\Greys_Code\Scheduled Programs\Funnels\CLOSED\Internal QC Funnel Plots &amp;amp;asofdt..pdf";

/*UNBLINDED GRAPHS*/

ods PDF close;
%mend;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There things in the backround that SAS does when multiple ODS destinations are open and I am think the timing of the switch to the new file might be problematic. At least this is easy to test.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 27 Jul 2022 17:48:36 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2022-07-27T17:48:36Z</dc:date>
    <item>
      <title>Issues with PW protecting a PDF file</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Issues-with-PW-protecting-a-PDF-file/m-p/825748#M25877</link>
      <description>&lt;P&gt;My goal here is to have two PDF files, one with data and graphs that is safe to share with an external study team and another that is strictly for internal members. The one designated as internal (Unblinded/Closed) must be password protected incase it is accidently shared with the external team as a means of safeguarding data that should not be shared.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The first sample of code does not work. The first PDF is created but the second PDF that is to be PW protected fails. Once I enter the PW to open the file the Adobe Acrobat error message of:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;An error exists on this page. Acrobat may not display the page correctly. Please contact the person who created the PDF document to correct the problem.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The titles, dates and page numbers print but no graphs on any of the pages. Blank PDF.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro ReportPlots;
ods _all_ close ;
options pdfsecurity=none;
ods PDF file="U:\Projects\ICECAP\Programs\Greys_Code\Scheduled Programs\Funnels\OPEN\External QC Funnel Plots &amp;amp;asofdt..pdf"   ;

&lt;FONT color="#339966"&gt;/*BLINDED SET OF GRAPHS*/&lt;/FONT&gt;

options pdfsecurity=low pdfpassword=(owner="Grey", open="Unlinded");
ods PDF file="U:\Projects\ICECAP\Programs\Greys_Code\Scheduled Programs\Funnels\CLOSED\Internal QC Funnel Plots &amp;amp;asofdt..pdf";

&lt;FONT color="#339966"&gt;/*UNBLINDED GRAPHS*/&lt;/FONT&gt;

ods PDF close;
%mend;

%ReportPlots;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This next block of code works exactly as i would like it to. 2 files, one opens freely and the other PW protected, opens and displays all graphs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;FONT color="#FF0000"&gt;options printerpath=pdf;&lt;/FONT&gt;
%macro ReportPlots;
ods _all_ close ;
options pdfsecurity=none;
ods &lt;FONT color="#FF0000"&gt;printer&lt;/FONT&gt; file="U:\Projects\ICECAP\Programs\Greys_Code\Scheduled Programs\Funnels\OPEN\External QC Funnel Plots &amp;amp;asofdt..pdf"   ;

&lt;FONT color="#339966"&gt;/*BLINDED SET OF GRAPHS*/&lt;/FONT&gt;

options pdfsecurity=low pdfpassword=(owner="Grey", open="Unlinded");
ods &lt;FONT color="#FF0000"&gt;printer &lt;/FONT&gt; file="U:\Projects\ICECAP\Programs\Greys_Code\Scheduled Programs\Funnels\CLOSED\Internal QC Funnel Plots &amp;amp;asofdt..pdf";

&lt;FONT color="#339966"&gt;/*UNBLINDED GRAPHS*/&lt;/FONT&gt;

ods &lt;FONT color="#FF0000"&gt;printer&lt;/FONT&gt; close;
%mend;

%ReportPlots;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My question is why? Why can I not us the ODS PDF statement and it work but I can assign the Printerpath as PDF and us the ODS PRINTER statement and it work fine?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am using SAS enterprise guide 7.1 , Adobe Acrobate 2017 (well above the recommended version 5.0 in the SAS documentation) on the latest version of Windows10 64 bit. Any insight into this would be helpful.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 17:29:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Issues-with-PW-protecting-a-PDF-file/m-p/825748#M25877</guid>
      <dc:creator>GreyJoy</dc:creator>
      <dc:date>2022-07-27T17:29:39Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with PW protecting a PDF file</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Issues-with-PW-protecting-a-PDF-file/m-p/825752#M25878</link>
      <description>&lt;P&gt;It is very likely that you are running into an issue about what is getting applied to the open ODS destinations when.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did you try Closing the first ODS PDF before the OPTIONS for Pdfsecurity?&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;%macro ReportPlots;
ods _all_ close ;
options pdfsecurity=none;
ods PDF file="U:\Projects\ICECAP\Programs\Greys_Code\Scheduled Programs\Funnels\OPEN\External QC Funnel Plots &amp;amp;asofdt..pdf"   ;

/*BLINDED SET OF GRAPHS*/
ODS PDF CLOSE; /* CLOSE THE FILE BEFORE SETTING THE OPTIONS FOR THE NEXT SECTION*/

options pdfsecurity=low pdfpassword=(owner="Grey", open="Unlinded");
ods PDF file="U:\Projects\ICECAP\Programs\Greys_Code\Scheduled Programs\Funnels\CLOSED\Internal QC Funnel Plots &amp;amp;asofdt..pdf";

/*UNBLINDED GRAPHS*/

ods PDF close;
%mend;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There things in the backround that SAS does when multiple ODS destinations are open and I am think the timing of the switch to the new file might be problematic. At least this is easy to test.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 17:48:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Issues-with-PW-protecting-a-PDF-file/m-p/825752#M25878</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-07-27T17:48:36Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with PW protecting a PDF file</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Issues-with-PW-protecting-a-PDF-file/m-p/825754#M25879</link>
      <description>&lt;P&gt;I did try that. I looked at my code and thought keeping one output within a closed ods output statement would work but it still provided the same broken result.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It looks cleaner and I think I will keep it that way in the working one going forward.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 17:52:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Issues-with-PW-protecting-a-PDF-file/m-p/825754#M25879</guid>
      <dc:creator>GreyJoy</dc:creator>
      <dc:date>2022-07-27T17:52:19Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with PW protecting a PDF file</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Issues-with-PW-protecting-a-PDF-file/m-p/847056#M26094</link>
      <description>&lt;P&gt;I found the solution. Evidently, when producing output in a PDF format the normal ODS PDF options for security level and passwords work as expected when producing tables.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, when you are creating graphical output the missing piece to the puzzle is the device option below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;goptions device=SASPRTC;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After adding this before the creation of the file my passwords work and the file is created approximately.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2022 14:54:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Issues-with-PW-protecting-a-PDF-file/m-p/847056#M26094</guid>
      <dc:creator>GreyJoy</dc:creator>
      <dc:date>2022-11-30T14:54:14Z</dc:date>
    </item>
  </channel>
</rss>

