private void MakePasswordTests(OutputFormat format) { _th.Profile.PdfSettings.Security.Enabled = false; _th.Profile.PdfSettings.Security.RequireUserPassword = false; _th.GenerateGsJob(PSfiles.ThreePDFCreatorTestpages, format); _th.Job.Profile.PdfSettings.Signature.SignaturePassword = TestCertPw; _th.RunGsJob(); EncryptionTester.DoPasswordTest(_th.Job); _th.Profile.PdfSettings.Security.Enabled = true; _th.Profile.PdfSettings.Security.RequireUserPassword = false; _th.GenerateGsJob(PSfiles.ThreePDFCreatorTestpages, format); _th.Job.Profile.PdfSettings.Signature.SignaturePassword = TestCertPw; _th.Job.Passwords.PdfUserPassword = "******"; _th.Job.Passwords.PdfOwnerPassword = "******"; _th.RunGsJob(); EncryptionTester.DoPasswordTest(_th.Job); _th.Profile.PdfSettings.Security.Enabled = true; _th.Profile.PdfSettings.Security.RequireUserPassword = true; _th.GenerateGsJob(PSfiles.ThreePDFCreatorTestpages, format); _th.Job.Profile.PdfSettings.Signature.SignaturePassword = TestCertPw; _th.Job.Passwords.PdfUserPassword = "******"; _th.Job.Passwords.PdfOwnerPassword = "******"; _th.RunGsJob(); EncryptionTester.DoPasswordTest(_th.Job); }
private void DoAllTests() { var format = _th.Job.Profile.OutputFormat; PdfVersionTester.CheckPDFVersion(_th.Job, _pdfProcessor); SigningTester.TestSignature(_th.Job); if (_th.Profile.BackgroundPage.Enabled) { BackgroundPageTester.BackgroundOnPage(_th.Job); } /* * if (format == OutputFormat.PdfA1B || format == OutputFormat.PdfA2B) * XmpMetadataTester.CheckForXMPMetadataUpdateStrings(_th.Job); */ if (format != OutputFormat.PdfX) { PDFValidation.ValidatePdf(_th.Job); } //Must be last because it changes the encryption if ((format == OutputFormat.Pdf) && (_th.Profile.PdfSettings.Security.Enabled)) { EncryptionTester.DoSecurityTest(_th.Job, IsIText); MakePasswordTests(_th.Job.Profile.OutputFormat); } }
private void TestEncryption() { PDFProcessor.ProcessPDF(_testFile, _th.Profile, _passwords); EncryptionTester.MakePasswordTest(_testFile, _th.Profile, _passwords); EncryptionTester.MakeSecurityTest(_testFile, _th.Profile, _passwords.PdfOwnerPassword); }
private void DoAllTheTesting(Job job) { PdfVersionTester.CheckPDFVersion(job, _pdfProcessor); EncryptionTester.DoSecurityTest(_th.Job, IsIText); SigningTester.TestSignature(job); MakePasswordTests(); }
private void TestEncryption() { _pdfProcessor.ProcessPdf(_th.Job); PdfVersionTester.CheckPDFVersion(_th.Job, _pdfProcessor); EncryptionTester.DoPasswordTest(_th.Job); EncryptionTester.DoSecurityTest(_th.Job, IsIText); }
public void EncryptionAndSigning() { _th.Job.Profile.OutputFormat = OutputFormat.Pdf; //Disables pdf metadata update _th.Job.Profile.PdfSettings.Security.Enabled = true; _th.Job.Profile.PdfSettings.Signature.Enabled = true; _th.Job.Profile.BackgroundPage.Enabled = false; PDFProcessor.ProcessPDF(_th.Job.OutputFiles[0], _th.Job.Profile, _th.Job.Passwords); EncryptionTester.MakeSecurityTest(_th.Job); SigningTester.TestSignature(_th.Job); }
public void MetadataAndEncryption() { _th.Job.Profile.OutputFormat = OutputFormat.PdfA2B; //Enables pdf metadata update _th.Job.Profile.PdfSettings.Security.Enabled = true; _th.Job.Profile.PdfSettings.Signature.Enabled = false; _th.Job.Profile.BackgroundPage.Enabled = false; PDFProcessor.ProcessPDF(_th.Job.OutputFiles[0], _th.Job.Profile, _th.Job.Passwords); XmpMetadataTester.CheckForXMPMetadataUpdateStrings(_th.Job); EncryptionTester.MakeSecurityTest(_th.Job); }
private void TestEncryption() { var job = new Job(new JobInfo(), _th.Profile, new JobTranslations(), new Accounts()); job.Passwords = _passwords; job.TempOutputFiles.Add(_testFile); PdfProcessor.ProcessPdf(job); EncryptionTester.MakePasswordTest(_testFile, _th.Profile, _passwords); EncryptionTester.MakeSecurityTest(_testFile, _th.Profile, _passwords.PdfOwnerPassword); }
public void EncryptionAndBackground() { _th.Job.Profile.OutputFormat = OutputFormat.Pdf; //Disables pdf metadata update _th.Job.Profile.PdfSettings.Security.Enabled = true; _th.Job.Profile.PdfSettings.Signature.Enabled = false; _th.Job.Profile.BackgroundPage.Enabled = true; PdfProcessor.ProcessPdf(_th.Job); EncryptionTester.MakeSecurityTest(_th.Job); BackgroundPageTester.BackgroundOnPage(_th.Job); }
public void EncryptionAndSigning() { GenerateGsJob_WithSettedOutput(TestFile.PDFCreatorTestpagePDF); //Disables pdf metadata update _th.Job.Profile.PdfSettings.Security.Enabled = true; _th.Job.Profile.PdfSettings.Signature.Enabled = true; _th.Job.Profile.BackgroundPage.Enabled = false; _pdfProcessor.ProcessPdf(_th.Job); EncryptionTester.DoSecurityTest(_th.Job, IsIText); SigningTester.TestSignature(_th.Job); }
public void EncryptionAndBackground() { GenerateGsJob_WithSettedOutput(TestFile.PDFCreatorTestpage_GS9_19_PDF); //Disables pdf metadata update _th.Job.Profile.PdfSettings.Security.Enabled = true; _th.Job.Profile.PdfSettings.Signature.Enabled = false; _th.Job.Profile.BackgroundPage.Enabled = true; _pdfProcessor.ProcessPdf(_th.Job); PdfVersionTester.CheckPDFVersion(_th.Job, _pdfProcessor); EncryptionTester.DoSecurityTest(_th.Job, IsIText); BackgroundPageTester.BackgroundOnPage(_th.Job); }
public void MetadataEncryptionAndSigning() { _th.Job.Profile.OutputFormat = OutputFormat.PdfA2B; //Enables pdf metadata update _th.Job.Profile.PdfSettings.Security.Enabled = true; _th.Job.Profile.PdfSettings.Signature.Enabled = true; _th.Job.Profile.BackgroundPage.Enabled = false; PdfProcessor.ProcessPdf(_th.Job); XmpMetadataTester.CheckForXMPMetadataUpdateStrings(_th.Job); EncryptionTester.MakeSecurityTest(_th.Job); SigningTester.TestSignature(_th.Job); }
public void TestEncryptionEnableFalse() { _th.Profile.PdfSettings.Security.Enabled = false; _th.Profile.PdfSettings.Signature.Enabled = false; _th.Profile.PdfSettings.Security.RequireUserPassword = true; _th.Profile.PdfSettings.Security.AllowToEditAssembly = false; _th.Profile.PdfSettings.Security.AllowToEditComments = false; _th.Profile.PdfSettings.Security.AllowToCopyContent = true; _th.Profile.PdfSettings.Security.AllowToFillForms = true; _th.Profile.PdfSettings.Security.AllowToEditTheDocument = false; _th.Profile.PdfSettings.Security.AllowPrinting = false; _th.Profile.PdfSettings.Security.RestrictPrintingToLowQuality = true; _th.Profile.PdfSettings.Security.AllowScreenReader = true; _th.Profile.PdfSettings.Security.EncryptionLevel = EncryptionLevel.Aes128Bit; _th.GenerateGsJob(PSfiles.ThreePDFCreatorTestpages, OutputFormat.Pdf); _th.RunGsJob(); EncryptionTester.DoSecurityTest(_th.Job, false); }