コード例 #1
0
        public static void Run()
        {
            try
            {
                // ExStart:RemoveRights
                // The path to the documents directory.
                string dataDir = RunExamples.GetDataDir_AsposePdfFacades_SecuritySignatures();
                string input   = dataDir + "DigitallySign.pdf";
                using (PdfFileSignature pdfSign = new PdfFileSignature())
                {
                    pdfSign.BindPdf(input);
                    if (pdfSign.ContainsUsageRights())
                    {
                        pdfSign.RemoveUsageRights();
                    }

                    pdfSign.Document.Save(dataDir + "RemoveRights_out_.pdf");
                }
                // ExEnd:RemoveRights
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }
コード例 #2
0
        public static void Run()
        {
            try
            {
                // ExStart:RemoveRights               
                // The path to the documents directory.
                string dataDir = RunExamples.GetDataDir_AsposePdfFacades_SecuritySignatures();
                string input = dataDir + "DigitallySign.pdf";
                using (PdfFileSignature pdfSign = new PdfFileSignature())
                {
                    pdfSign.BindPdf(input);
                    if (pdfSign.ContainsUsageRights())
                    {
                        pdfSign.RemoveUsageRights();
                    }

                    pdfSign.Document.Save(dataDir + "RemoveRights_out.pdf");
                }
                // ExEnd:RemoveRights
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }