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); } }
public void SigningPdfA2b_TwoSignatures_MultisigningIsEnabled_BothSignatuesAreValid() { TestHelper.Job.Profile.PdfSettings.Signature.AllowMultiSigning = true; TestHelper.Job.Profile.OutputFormat = OutputFormat.PdfA2B; TestHelper.Job.Profile.PdfSettings.Signature.DisplaySignatureInDocument = true; TestHelper.Job.Profile.PdfSettings.Signature.SignaturePage = SignaturePage.FirstPage; TestHelper.Job.Profile.PdfSettings.Signature.SignatureCustomPage = 2; TestHelper.Job.Profile.PdfSettings.Signature.LeftX = 300; TestHelper.Job.Profile.PdfSettings.Signature.LeftY = 200; TestHelper.Job.Profile.PdfSettings.Signature.RightX = 500; TestHelper.Job.Profile.PdfSettings.Signature.RightY = 400; TestHelper.Job.Profile.PdfSettings.Signature.SignContact = "Mr.Test"; TestHelper.Job.Profile.PdfSettings.Signature.SignLocation = "Testland"; TestHelper.Job.Profile.PdfSettings.Signature.SignReason = "The Reason is Testing"; TestHelper.Job.Profile.PdfSettings.Signature.TimeServerUrl = "http://timestamp.globalsign.com/scripts/timestamp.dll"; TestHelper.Job.Profile.PdfSettings.Security.Enabled = false; PDFProcessor.ProcessPdf(TestHelper.Job); PdfVersionTester.CheckPDFVersion(TestHelper.Job, PDFProcessor); SigningTester.TestSignature(TestHelper.Job); var multiSignedFile = SigningTester.TestMultipleSigning(TestHelper.Job, PDFProcessor); if (Debugger.IsAttached) { Process.Start(multiSignedFile); Debugger.Break(); } }
private void DoAllTheTesting(Job job) { PdfVersionTester.CheckPDFVersion(job, _pdfProcessor); EncryptionTester.DoSecurityTest(_th.Job, IsIText); SigningTester.TestSignature(job); MakePasswordTests(); }
public void SigningPdf_Invisible() { TestHelper.Job.Profile.OutputFormat = OutputFormat.Pdf; TestHelper.Job.Profile.PdfSettings.Signature.DisplaySignatureInDocument = false; PdfProcessor.ProcessPdf(TestHelper.Job); SigningTester.TestSignature(TestHelper.Job); PdfVersionTester.CheckPDFVersion(TestHelper.Job, PdfProcessor); }
public void SigningPdfA2B() { TestHelper.GenerateGsJob_WithSetOutput(TestFile.PDFCreatorTestpage_GS9_19_PDF_A_2b); ApplySignatureSettings(); PdfProcessor.ProcessPdf(TestHelper.Job); SigningTester.TestSignature(TestHelper.Job); PdfVersionTester.CheckPDFVersion(TestHelper.Job, PdfProcessor); }
private void DoTestTimeServer(string timeserverUrl) { TestHelper.Job.Profile.OutputFormat = OutputFormat.Pdf; _timeServerAccount.Url = timeserverUrl; PdfProcessor.ProcessPdf(TestHelper.Job); SigningTester.TestSignature(TestHelper.Job); PdfVersionTester.CheckPDFVersion(TestHelper.Job, PdfProcessor); }
public void SigningAndBackground() { _th.Job.Profile.OutputFormat = OutputFormat.Pdf; //Disables pdf metadata update _th.Job.Profile.PdfSettings.Security.Enabled = false; _th.Job.Profile.PdfSettings.Signature.Enabled = true; _th.Job.Profile.BackgroundPage.Enabled = true; PdfProcessor.ProcessPdf(_th.Job); SigningTester.TestSignature(_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 SigningAndBackground() { GenerateGsJob_WithSettedOutput(TestFile.PDFCreatorTestpagePDF); //Disables pdf metadata update _th.Job.Profile.PdfSettings.Security.Enabled = false; _th.Job.Profile.PdfSettings.Signature.Enabled = true; _th.Job.Profile.BackgroundPage.Enabled = true; _pdfProcessor.ProcessPdf(_th.Job); SigningTester.TestSignature(_th.Job); BackgroundPageTester.BackgroundOnPage(_th.Job); }
public void SigningPdf_CustomPageGreaterThanNumberOfPages() { TestHelper.Job.Profile.OutputFormat = OutputFormat.Pdf; TestHelper.Job.Profile.PdfSettings.Signature.DisplaySignatureInDocument = true; TestHelper.Job.Profile.PdfSettings.Signature.SignaturePage = SignaturePage.CustomPage; TestHelper.Job.Profile.PdfSettings.Signature.SignatureCustomPage = 5; PDFProcessor.ProcessPdf(TestHelper.Job); SigningTester.TestSignature(TestHelper.Job); PdfVersionTester.CheckPDFVersion(TestHelper.Job, PDFProcessor); }
public void MetadataAndSigning() { GenerateGsJob_WithSettedOutput(TestFile.TestpagePDFA2b); //Enables pdf metadata update _th.Job.Profile.PdfSettings.Security.Enabled = false; _th.Job.Profile.PdfSettings.Signature.Enabled = true; _th.Job.Profile.BackgroundPage.Enabled = false; _pdfProcessor.ProcessPdf(_th.Job); XmpMetadataTester.CheckForXMPMetadataUpdateStrings(_th.Job); SigningTester.TestSignature(_th.Job); }
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 SigningPdf_LastPage() { TestHelper.Job.Profile.OutputFormat = OutputFormat.Pdf; TestHelper.Job.Profile.PdfSettings.Signature.DisplaySignatureInDocument = true; TestHelper.Job.Profile.PdfSettings.Signature.SignaturePage = SignaturePage.LastPage; TestHelper.Job.Profile.PdfSettings.Signature.SignatureCustomPage = 2; PdfProcessor.ProcessPdf(TestHelper.Job); SigningTester.TestSignature(TestHelper.Job); PdfVersionTester.CheckPDFVersion(TestHelper.Job, PdfProcessor); }
public void MetadataAndSigning() { _th.Job.Profile.OutputFormat = OutputFormat.PdfA2B; //Enables pdf metadata update _th.Job.Profile.PdfSettings.Security.Enabled = false; _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); XmpMetadataTester.CheckForXMPMetadataUpdateStrings(_th.Job); SigningTester.TestSignature(_th.Job); }
public void MetadataSigningAndBackground() { _th.Job.Profile.OutputFormat = OutputFormat.PdfA2B; //Enables pdf metadata update _th.Job.Profile.PdfSettings.Security.Enabled = false; _th.Job.Profile.PdfSettings.Signature.Enabled = true; _th.Job.Profile.BackgroundPage.Enabled = true; PdfProcessor.ProcessPdf(_th.Job); XmpMetadataTester.CheckForXMPMetadataUpdateStrings(_th.Job); SigningTester.TestSignature(_th.Job); BackgroundPageTester.BackgroundOnPage(_th.Job); }
public void TimeServer_FreeTSA() { TestHelper.Job.Profile.OutputFormat = OutputFormat.Pdf; TimeServerAccount.IsSecured = true; TimeServerAccount.UserName = "******"; TimeServerAccount.Password = "******"; PDFProcessor.ProcessPdf(TestHelper.Job); SigningTester.TestSignature(TestHelper.Job); PdfVersionTester.CheckPDFVersion(TestHelper.Job, PDFProcessor); }
public void All_MatadataUpdateEncryptionSigningAndBackground() { _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 = true; PDFProcessor.ProcessPDF(_th.Job.OutputFiles[0], _th.Job.Profile, _th.Job.Passwords); XmpMetadataTester.CheckForXMPMetadataUpdateStrings(_th.Job); EncryptionTester.MakeSecurityTest(_th.Job); SigningTester.TestSignature(_th.Job); BackgroundPageTester.BackgroundOnPage(_th.Job); }
public void SigningPdfA2B_SecuredTimeServerEnabled_TimeserverDoesNotRequireLogin() { TestHelper.Job.Profile.OutputFormat = OutputFormat.PdfA2B; TestHelper.Job.Profile.PdfSettings.Signature.TimeServerUrl = "http://timestamp.globalsign.com/scripts/timestamp.dll"; TestHelper.Job.Profile.PdfSettings.Signature.TimeServerIsSecured = true; TestHelper.Job.Profile.PdfSettings.Signature.TimeServerLoginName = "TimeServerLoginName"; TestHelper.Job.Profile.PdfSettings.Signature.TimeServerPassword = "******"; PDFProcessor.ProcessPdf(TestHelper.Job); SigningTester.TestSignature(TestHelper.Job); PdfVersionTester.CheckPDFVersion(TestHelper.Job, PDFProcessor); }
public void EncryptionSigningAndBackground() { GenerateGsJob_WithSettedOutput(TestFile.PDFCreatorTestpage_GS9_19_PDF); //Disables pdf metadata update _th.Job.Profile.PdfSettings.Security.Enabled = true; _th.Job.Profile.PdfSettings.Signature.Enabled = true; _th.Job.Profile.BackgroundPage.Enabled = true; _pdfProcessor.ProcessPdf(_th.Job); PdfVersionTester.CheckPDFVersion(_th.Job, _pdfProcessor); EncryptionTester.DoSecurityTest(_th.Job, IsIText); SigningTester.TestSignature(_th.Job); BackgroundPageTester.BackgroundOnPage(_th.Job); }
public void SigningPdf_CustomPageSpecialCharacters() { TestHelper.Job.Profile.OutputFormat = OutputFormat.Pdf; TestHelper.Job.Profile.PdfSettings.Signature.SignaturePage = SignaturePage.CustomPage; TestHelper.Job.Profile.PdfSettings.Signature.SignatureCustomPage = 2; TestHelper.Job.Profile.PdfSettings.Signature.SignContact = "^^ Mr.Täst ^^"; TestHelper.Job.Profile.PdfSettings.Signature.SignLocation = "Tästlènd"; TestHelper.Job.Profile.PdfSettings.Signature.SignReason = "The Réßön is Tästing"; PdfProcessor.ProcessPdf(TestHelper.Job); SigningTester.TestSignature(TestHelper.Job); PdfVersionTester.CheckPDFVersion(TestHelper.Job, PdfProcessor); }
public void SigningPdf_SecuredTimeServerEnabled_TimeserverDoesNotRequireLogin() { TestHelper.Job.Profile.OutputFormat = OutputFormat.Pdf; _timeServerAccount.Url = "http://timestamp.globalsign.com/scripts/timestamp.dll"; _timeServerAccount.IsSecured = true; _timeServerAccount.UserName = "******"; _timeServerAccount.Password = "******"; PdfProcessor.ProcessPdf(TestHelper.Job); SigningTester.TestSignature(TestHelper.Job); PdfVersionTester.CheckPDFVersion(TestHelper.Job, PdfProcessor); }
public void TimeServer_GlobalSign() { TestHelper.Job.Profile.OutputFormat = OutputFormat.Pdf; TimeServerAccount.Url = "http://timestamp.globalsign.com/scripts/timestamp.dll"; TimeServerAccount.IsSecured = true; TimeServerAccount.UserName = "******"; TimeServerAccount.Password = "******"; PDFProcessor.ProcessPdf(TestHelper.Job); SigningTester.TestSignature(TestHelper.Job); PdfVersionTester.CheckPDFVersion(TestHelper.Job, PDFProcessor); }
public void SigningPdf_CustomPageSpecialCharacters() { TestHelper.Job.Profile.OutputFormat = OutputFormat.Pdf; TestHelper.Job.Profile.PdfSettings.Signature.SignaturePage = SignaturePage.CustomPage; TestHelper.Job.Profile.PdfSettings.Signature.SignatureCustomPage = 2; TestHelper.Job.Profile.PdfSettings.Signature.SignContact = "^^ Mr.Täst ^^"; TestHelper.Job.Profile.PdfSettings.Signature.SignLocation = "Tästlènd"; TestHelper.Job.Profile.PdfSettings.Signature.SignReason = "The Réßön is Tästing"; TestHelper.Job.Profile.PdfSettings.Signature.TimeServerUrl = "http://timestamp.globalsign.com/scripts/timestamp.dll"; PDFProcessor.ProcessPdf(TestHelper.Job); SigningTester.TestSignature(TestHelper.Job); PdfVersionTester.CheckPDFVersion(TestHelper.Job, PDFProcessor); }
public void SigningPdf_SigningWasSuccessful_TokensWereReplacedInSignatureMetadata() { var tokenKey = TestHelper.Job.TokenReplacer.GetTokenNames(true)[0]; var tokenValue = TestHelper.Job.TokenReplacer.ReplaceTokens(tokenKey); TestHelper.Job.Profile.PdfSettings.Signature.SignReason = tokenKey; TestHelper.Job.Profile.PdfSettings.Signature.SignContact = tokenKey; TestHelper.Job.Profile.PdfSettings.Signature.SignLocation = tokenKey; PdfProcessor.ProcessPdf(TestHelper.Job); // set expected values with replaced tokens before testing TestHelper.Job.Profile.PdfSettings.Signature.SignReason = tokenValue; TestHelper.Job.Profile.PdfSettings.Signature.SignContact = tokenValue; TestHelper.Job.Profile.PdfSettings.Signature.SignLocation = tokenValue; SigningTester.TestSignature(TestHelper.Job); }
public void TestSigningLastPage() { _th.Job.Profile.PdfSettings.Signature.AllowMultiSigning = false; _th.Job.Profile.PdfSettings.Signature.DisplaySignatureInDocument = true; _th.Job.Profile.PdfSettings.Signature.SignaturePage = SignaturePage.LastPage; _th.Job.Profile.PdfSettings.Signature.SignatureCustomPage = 2; _th.Job.Profile.PdfSettings.Signature.LeftX = 100; _th.Job.Profile.PdfSettings.Signature.LeftY = 20; _th.Job.Profile.PdfSettings.Signature.RightX = 200; _th.Job.Profile.PdfSettings.Signature.RightY = 40; _th.Job.Profile.PdfSettings.Signature.SignContact = "Mr.Test"; _th.Job.Profile.PdfSettings.Signature.SignLocation = "Testland"; _th.Job.Profile.PdfSettings.Signature.SignReason = "The Reason is Testing"; _th.Job.Profile.PdfSettings.Signature.TimeServerUrl = "http://timestamp.globalsign.com/scripts/timestamp.dll"; PdfProcessor.ProcessPdf(_th.Job); SigningTester.TestSignature(_th.Job); }
public void SigningPdfA1b_TwoSignatures_MultisigningIsEnabled_BothSignatuesAreValid() { TestHelper.Job.Profile.PdfSettings.Signature.AllowMultiSigning = true; TestHelper.Job.Profile.OutputFormat = OutputFormat.PdfA1B; TestHelper.Job.Profile.PdfSettings.Signature.DisplaySignatureInDocument = true; PDFProcessor.ProcessPdf(TestHelper.Job); PdfVersionTester.CheckPDFVersion(TestHelper.Job, PDFProcessor); SigningTester.TestSignature(TestHelper.Job); var multiSignedFile = SigningTester.TestMultipleSigning(TestHelper.Job, PDFProcessor); if (Debugger.IsAttached) { Process.Start(multiSignedFile); Debugger.Break(); } }
public void TestSigningCustomPageGreaterThanNumberOfPages() { _th.Job.Profile.PdfSettings.Signature.AllowMultiSigning = false; _th.Job.Profile.PdfSettings.Signature.DisplaySignatureInDocument = true; _th.Job.Profile.PdfSettings.Signature.SignaturePage = SignaturePage.CustomPage; _th.Job.Profile.PdfSettings.Signature.SignatureCustomPage = 5; _th.Job.Profile.PdfSettings.Signature.LeftX = 100; _th.Job.Profile.PdfSettings.Signature.LeftY = 20; _th.Job.Profile.PdfSettings.Signature.RightX = 200; _th.Job.Profile.PdfSettings.Signature.RightY = 40; _th.Job.Profile.PdfSettings.Signature.SignContact = "Mr.Test"; _th.Job.Profile.PdfSettings.Signature.SignLocation = "Testland"; _th.Job.Profile.PdfSettings.Signature.SignReason = "The Reason is Testing"; _th.Job.Profile.PdfSettings.Signature.TimeServerUrl = "http://timestamp.globalsign.com/scripts/timestamp.dll"; PDFProcessor.ProcessPDF(_th.Job.OutputFiles[0], _th.Job.Profile, _th.Job.Passwords); SigningTester.TestSignature(_th.Job); }
public void TestSigningCustomPageSpecialCharacters() { _th.Job.Profile.PdfSettings.Signature.AllowMultiSigning = false; _th.Job.Profile.PdfSettings.Signature.DisplaySignatureInDocument = true; _th.Job.Profile.PdfSettings.Signature.SignaturePage = SignaturePage.CustomPage; _th.Job.Profile.PdfSettings.Signature.SignatureCustomPage = 2; _th.Job.Profile.PdfSettings.Signature.LeftX = 1000; _th.Job.Profile.PdfSettings.Signature.LeftY = 200; _th.Job.Profile.PdfSettings.Signature.RightX = 2000; _th.Job.Profile.PdfSettings.Signature.RightY = 400; _th.Job.Profile.PdfSettings.Signature.SignContact = "^^ Mr.Täst ^^"; _th.Job.Profile.PdfSettings.Signature.SignLocation = "Tästlènd"; _th.Job.Profile.PdfSettings.Signature.SignReason = "The Réßön is Tästing"; _th.Job.Profile.PdfSettings.Signature.TimeServerUrl = "http://timestamp.globalsign.com/scripts/timestamp.dll"; PDFProcessor.ProcessPDF(_th.Job.OutputFiles[0], _th.Job.Profile, _th.Job.Passwords); SigningTester.TestSignature(_th.Job); }
public void SigningPdf_TwoSignatures_MultisigningIsEnabled_FirstSignatureIsValid() { if (!Debugger.IsAttached) { return; } // TODO make multi-signing testable TestHelper.Job.Profile.PdfSettings.Signature.AllowMultiSigning = true; TestHelper.Job.Profile.OutputFormat = OutputFormat.Pdf; TestHelper.Job.Profile.PdfSettings.Signature.DisplaySignatureInDocument = true; PdfProcessor.ProcessPdf(TestHelper.Job); PdfVersionTester.CheckPDFVersion(TestHelper.Job, PdfProcessor); SigningTester.TestSignature(TestHelper.Job); var multiSignedFile = SigningTester.TestMultipleSigning(TestHelper.Job, PdfProcessor); Process.Start(multiSignedFile); Debugger.Break(); }
public void TwoSignatures_MultisigningIsEnabled_BothSignatuesAreValid() { _th.Job.Profile.PdfSettings.Signature.AllowMultiSigning = true; _th.Job.Profile.PdfSettings.Signature.DisplaySignatureInDocument = true; _th.Job.Profile.PdfSettings.Signature.SignaturePage = SignaturePage.FirstPage; _th.Job.Profile.PdfSettings.Signature.SignatureCustomPage = 2; _th.Job.Profile.PdfSettings.Signature.LeftX = 300; _th.Job.Profile.PdfSettings.Signature.LeftY = 200; _th.Job.Profile.PdfSettings.Signature.RightX = 500; _th.Job.Profile.PdfSettings.Signature.RightY = 400; _th.Job.Profile.PdfSettings.Signature.SignContact = "Mr.Test"; _th.Job.Profile.PdfSettings.Signature.SignLocation = "Testland"; _th.Job.Profile.PdfSettings.Signature.SignReason = "The Reason is Testing"; _th.Job.Profile.PdfSettings.Signature.TimeServerUrl = "http://timestamp.globalsign.com/scripts/timestamp.dll"; _th.Job.Profile.PdfSettings.Security.Enabled = false; PDFProcessor.ProcessPDF(_th.Job.OutputFiles[0], _th.Job.Profile, _th.Job.Passwords); _th.Job.Profile.PdfSettings.Signature.SignaturePage = SignaturePage.LastPage; PDFProcessor.ProcessPDF(_th.Job.OutputFiles[0], _th.Job.Profile, _th.Job.Passwords); SigningTester.TestSignature(_th.Job, 2, true); }