How to disable Save as option in generated pdf

<span style=“font-size: 11pt; line-height: 115%; font-family: “Calibri”,“sans-serif”;” lang=“EN-AU”>Hi,

I
am generating a .Pdf file using Aspose.pdf 4.8.0. Every thing is working
fine but as per our requirement the generated pdf should only available
for read purpose and no one can do <!–[if gte mso 9]>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:DontVertAlignCellWithSp/>
<w:DontBreakConstrainedForcedTables/>
<w:DontVertAlignInTxbx/>
<w:Word11KerningPairs/>
<w:CachedColBalance/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val=“Cambria Math”/>
<m:brkBin m:val=“before”/>
<m:brkBinSub m:val="–"/>
<m:smallFrac m:val=“off”/>
<m:dispDef/>
<m:lMargin m:val=“0”/>
<m:rMargin m:val=“0”/>
<m:defJc m:val=“centerGroup”/>
<m:wrapIndent m:val=“1440”/>
<m:intLim m:val=“subSup”/>
<m:naryLim m:val=“undOvr”/>
</m:mathPr></w:WordDocument>
<![endif]–><!–[if gte mso 10]>

/* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}

<![endif]–><span style=“font-size: 11pt; line-height: 115%; font-family: “Calibri”,“sans-serif”;” lang=“EN-AU”>Copy,
Paste, Print, Print Screen, Email, Save, Save As etc. Other than Save As and Print Screen, other options are disabled. I have written the following code

Aspose.Pdf.Pdf document = new Aspose.Pdf.Pdf();
Aspose.Pdf.Section section = document.Sections.Add();
Aspose.Pdf.Text text1 = new Aspose.Pdf.Text(“HTML contents will be displayed under this line”);
section.Paragraphs.Add(text1);

Aspose.Pdf.Security security = new Aspose.Pdf.Security();
security.IsAnnotationsModifyingAllowed = false;
security.IsContentsModifyingAllowed = false;
security.IsCopyingAllowed = false;
security.IsDegradedPrintingAllowed = false;
security.IsDocumentAssemblyingAllowed = false;
security.IsFormFillingAllowed = false;
security.IsPrintingAllowed = false;
security.IsScreenReadersAllowed = false;

document.Security = security;

document.Save(“test.pdf”);
<span style=“font-size: 11pt; line-height: 115%; font-family: “Calibri”,“sans-serif”;” lang=“EN-AU”>How to achieve the same using Aspose.




Hello Shashi kant,

Thanks for using our products.

Aspose.Pdf only controls the contents area of the PDF document. However, it does not have any control over the controls of the PDF document viewer and I am afraid we might not be able to support this feature. We apologize for your inconvenience.