From 8fce5bb9366551fa34092861372e85345e372233 Mon Sep 17 00:00:00 2001 From: Joseph Argento Date: Tue, 11 Mar 2025 15:30:50 -0500 Subject: [PATCH 1/6] Simplify description. --- Images/ImageImport/ImageImport.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Images/ImageImport/ImageImport.cs b/Images/ImageImport/ImageImport.cs index 6e2530b..d2e395c 100644 --- a/Images/ImageImport/ImageImport.cs +++ b/Images/ImageImport/ImageImport.cs @@ -5,11 +5,9 @@ /* * - * This program demonstrates how to import images into a PDF file. The program runs without - * prompting you, and creates two PDF files, demonstrating how to import graphics from image files - * into a PDF file. One of the PDF output files is the result of graphics imported from a multi-page TIF file. + * This sample demonstrates how to import an image into a PDF file. * - * Copyright (c) 2007-2023, Datalogics, Inc. All rights reserved. + * Copyright (c) 2007-2025, Datalogics, Inc. All rights reserved. * */ From 35012c4d1d26e843ddde3836b1d4fcd1585e442d Mon Sep 17 00:00:00 2001 From: Joseph Argento Date: Thu, 17 Apr 2025 08:37:04 -0500 Subject: [PATCH 2/6] Limit char quad matching. QA noticed for a particular document viewing it caused an out of bounds exception. This is a legacy viewer sample which had a lot of things crammed into it. In this case text highlighting isn't quite handling unicode correctly but we have dedicated Text samples for showing how to work with the WordFinder so let's just make sure the text size and # of quads match up to prevent this problem from happening. --- Display/DotNETViewerComponent/DotNETView.cs | 39 +++++++++++---------- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/Display/DotNETViewerComponent/DotNETView.cs b/Display/DotNETViewerComponent/DotNETView.cs index 43782d9..61bec1f 100644 --- a/Display/DotNETViewerComponent/DotNETView.cs +++ b/Display/DotNETViewerComponent/DotNETView.cs @@ -906,33 +906,36 @@ private IList GetPageQuads(int pageNum) bool letter = false; Quad q = null; IList charQuads = word.CharQuads; - for (int i = 0; i < text.Length; ++i) + if (charQuads.Count == text.Length) { - if (char.IsLetter(text, i) != letter) - { - if (q != null) quads.Add(q); - q = null; - letter = !letter; - } - if (q == null) - { - q = Utils.Clone(charQuads[i]); - } - else // check distance between quads - if we can concat them or not + for (int i = 0; i < text.Length; ++i) { - const double interval = 0.5; - if (q.BottomRight.H + interval < charQuads[i].BottomLeft.H) + if (char.IsLetter(text, i) != letter) + { + if (q != null) quads.Add(q); + q = null; + letter = !letter; + } + if (q == null) { - quads.Add(q); q = Utils.Clone(charQuads[i]); } - else + else // check distance between quads - if we can concat them or not { - q = Concat(q, charQuads[i]); + const double interval = 0.5; + if (q.BottomRight.H + interval < charQuads[i].BottomLeft.H) + { + quads.Add(q); + q = Utils.Clone(charQuads[i]); + } + else + { + q = Concat(q, charQuads[i]); + } } } } - if (q != null) quads.Add(q); + if (q != null) quads.Add(q); } } if (quads.Count > 0) return quads; From b86af01ed6ace3318ae131d0a5bc9e546dec33d7 Mon Sep 17 00:00:00 2001 From: bruceh Date: Tue, 6 May 2025 13:02:53 -0500 Subject: [PATCH 3/6] Add Digital Signature sample Fix csproj Add sample to github actions --- .../workflows/test-net-framework-samples.yml | 1 + .../AddDigitalSignature.cs | 77 +++++++++++++++++++ .../AddDigitalSignature.csproj | 62 +++++++++++++++ Security/AddDigitalSignature/App.config | 6 ++ Security/README.md | 3 + 5 files changed, 149 insertions(+) create mode 100644 Security/AddDigitalSignature/AddDigitalSignature.cs create mode 100644 Security/AddDigitalSignature/AddDigitalSignature.csproj create mode 100644 Security/AddDigitalSignature/App.config diff --git a/.github/workflows/test-net-framework-samples.yml b/.github/workflows/test-net-framework-samples.yml index a775b52..7bd74bc 100644 --- a/.github/workflows/test-net-framework-samples.yml +++ b/.github/workflows/test-net-framework-samples.yml @@ -93,6 +93,7 @@ jobs: 'Other/StreamIO/', 'Printing/PrintPDF/', 'Printing/PrintPDFGUI/', + 'Security/AddDigitalSignature/', 'Security/AddRegexRedaction/', 'Security/Redactions/', 'Text/AddGlyphs/', diff --git a/Security/AddDigitalSignature/AddDigitalSignature.cs b/Security/AddDigitalSignature/AddDigitalSignature.cs new file mode 100644 index 0000000..ad2e589 --- /dev/null +++ b/Security/AddDigitalSignature/AddDigitalSignature.cs @@ -0,0 +1,77 @@ +using System; +using System.Collections.Generic; +using System.Text; +using Datalogics.PDFL; + +/* + * + * This sample program demonstrates the use of AddDigitalSignature. + * + * Copyright (c) 2025, Datalogics, Inc. All rights reserved. + * + */ +namespace AddDigitalSignature +{ + class AddDigitalSignature + { + static void Main(string[] args) + { + Console.WriteLine("AddDigitalSignature Sample:"); + + using (new Library()) + { + Console.WriteLine("Initialized the library."); + + String sInput = Library.ResourceDirectory + "Sample_Input/SixPages.pdf"; + String sLogo = Library.ResourceDirectory + "Sample_Input/ducky_alpha.tif"; + String sOutput = "DigSig-out.pdf"; + + if (args.Length > 0) + sInput = args[0]; + + if (args.Length > 1) + sOutput = args[1]; + + if (args.Length > 2) + sLogo = args[2]; + + Console.WriteLine("Input file: " + sInput); + Console.WriteLine("Writing to output: " + sOutput); + + using (Document doc = new Document(sInput)) + { + using (Datalogics.PDFL.SignDoc sigDoc = new Datalogics.PDFL.SignDoc()) + { + // Setup Sign params + sigDoc.FieldID = SignatureFieldID.CreateFieldWithQualifiedName; + sigDoc.FieldName = "Signature_es_:signatureblock"; + + // Set credential related attributes + sigDoc.DigestCategory = DigestCategory.Sha256; + sigDoc.CredentialDataFormat = CredentialDataFmt.NonPFX; + sigDoc.SetNonPfxSignerCert("Credentials/DER/RSA_certificate.der", 0, CredentialStorageFmt.OnDisk); + sigDoc.SetNonPfxPrivateKey("Credentials/DER/RSA_privKey.der", 0, CredentialStorageFmt.OnDisk); + + // Setup the signer information + // (Logo image is optional) + sigDoc.SetSignerInfo(sOutput, 0.5, "John Doe", "Chicago, IL", "Approval", "Datalogics, Inc.", + DisplayTraits.KDisplayAll); + + // Set the size and location of the signature box (optional) + // If not set, invisible signature will be placed on first page + sigDoc.SignatureBoxPageNumber = 0; + sigDoc.SignatureBoxRectangle = new Rect(100, 300, 400, 400); + + // Setup Save params + sigDoc.OutputPath = sOutput; + + // Finally, sign and save the document + sigDoc.AddDigitalSignature(doc); + + Console.WriteLine(); + } + } + } + } + } +} diff --git a/Security/AddDigitalSignature/AddDigitalSignature.csproj b/Security/AddDigitalSignature/AddDigitalSignature.csproj new file mode 100644 index 0000000..0e49989 --- /dev/null +++ b/Security/AddDigitalSignature/AddDigitalSignature.csproj @@ -0,0 +1,62 @@ + + + + + Debug + x64 + {3790CE63-DB43-4F16-8226-BDFEFA25BCDD} + Exe + AddDigitalSignature + AddDigitalSignature + v4.7.2 + 512 + true + true + + + + + x64 + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + x64 + pdbonly + false + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + 18.* + + + + + + + \ No newline at end of file diff --git a/Security/AddDigitalSignature/App.config b/Security/AddDigitalSignature/App.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/Security/AddDigitalSignature/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Security/README.md b/Security/README.md index bee07ff..7bf8293 100644 --- a/Security/README.md +++ b/Security/README.md @@ -1,3 +1,6 @@ +## ***AddDigitalSignature*** +Demonstrates adding a digital signature with a logo to a PDF document. + ## ***AddRegexRedaction*** Uses a regular expression to find a specified phrase of text in a PDF document and then redacts that text. From 01335680c49a18cb03c40e87a22560e86c19984c Mon Sep 17 00:00:00 2001 From: bruceh Date: Wed, 7 May 2025 10:45:10 -0500 Subject: [PATCH 4/6] Update sln files --- .../ChangeLayerConfiguration.csproj | 2 +- .../ZUGFeRDConverter/ZUGFeRDConverter.csproj | 6 +- .../AddTextToImage/AddTextToImage.csproj | 4 +- Samples.sln | 147 +++++++++--------- .../AddDigitalSignature.csproj | 2 +- .../AddDigitalSignature.sln | 24 +++ .../ExtractTextFromAnnotations.csproj | 4 +- 7 files changed, 109 insertions(+), 80 deletions(-) create mode 100644 Security/AddDigitalSignature/AddDigitalSignature.sln diff --git a/ContentModification/ChangeLayerConfiguration/ChangeLayerConfiguration.csproj b/ContentModification/ChangeLayerConfiguration/ChangeLayerConfiguration.csproj index 888feec..97ca89d 100644 --- a/ContentModification/ChangeLayerConfiguration/ChangeLayerConfiguration.csproj +++ b/ContentModification/ChangeLayerConfiguration/ChangeLayerConfiguration.csproj @@ -4,7 +4,7 @@ Debug x64 - {C5493EAE-45F6-4502-9D26-5BFEC574729F} + {E2C4287F-5817-49CE-912D-9A9F29DBC0DD} Exe ChangeLayerConfiguration ChangeLayerConfiguration diff --git a/DocumentConversion/ZUGFeRDConverter/ZUGFeRDConverter.csproj b/DocumentConversion/ZUGFeRDConverter/ZUGFeRDConverter.csproj index 5296257..4f22676 100644 --- a/DocumentConversion/ZUGFeRDConverter/ZUGFeRDConverter.csproj +++ b/DocumentConversion/ZUGFeRDConverter/ZUGFeRDConverter.csproj @@ -1,10 +1,10 @@ - + Debug x64 - {7e090b4f-0db4-4c40-a48a-40c0111019d5} + {7CA392CB-AFD3-4BD8-B3B5-C634A8A51F74} Exe ZUGFeRDConverter ZUGFeRDConverter @@ -56,4 +56,4 @@ - + \ No newline at end of file diff --git a/OpticalCharacterRecognition/AddTextToImage/AddTextToImage.csproj b/OpticalCharacterRecognition/AddTextToImage/AddTextToImage.csproj index d3531e5..e866807 100644 --- a/OpticalCharacterRecognition/AddTextToImage/AddTextToImage.csproj +++ b/OpticalCharacterRecognition/AddTextToImage/AddTextToImage.csproj @@ -1,10 +1,10 @@ - + Debug x64 - {a1a2f184-6250-4843-8d6b-3a72776dd27d} + {7B949A55-4748-4B93-A9D7-AE6555648A79} Exe AddTextToImage AddTextToImage diff --git a/Samples.sln b/Samples.sln index 98d5000..cfaba70 100644 --- a/Samples.sln +++ b/Samples.sln @@ -20,7 +20,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Clips", "ContentCreation\Cl EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CreateBookmarks", "ContentCreation\CreateBookmarks\CreateBookmarks.csproj", "{157F72BC-DCD4-496B-A5EE-FC50AADAFA3F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GradientShade", "ContentCreation\GradientShade\GradientShade.csproj", "{64dbb1f8-8ccf-40ec-8eb1-dde0b3586595}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GradientShade", "ContentCreation\GradientShade\GradientShade.csproj", "{64DBB1F8-8CCF-40EC-8EB1-DDE0B3586595}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MakeDocWithCalGrayColorSpace", "ContentCreation\MakeDocWithCalGrayColorSpace\MakeDocWithCalGrayColorSpace.csproj", "{6D9CDBE3-17B7-4337-BD9D-DAA378791244}" EndProject @@ -50,7 +50,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AddCollection", "ContentMod EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AddQRCode", "ContentModification\AddQRCode\AddQRCode.csproj", "{C5493EAE-45F6-4502-9D26-5BFEC574729F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChangeLayerConfiguration", "ContentModification\ChangeLayerConfiguration\ChangeLayerConfiguration.csproj", "{C5493EAE-45F6-4502-9D26-5BFEC574729F}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChangeLayerConfiguration", "ContentModification\ChangeLayerConfiguration\ChangeLayerConfiguration.csproj", "{E2C4287F-5817-49CE-912D-9A9F29DBC0DD}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChangeLinkColors", "ContentModification\ChangeLinkColors\ChangeLinkColors.csproj", "{8781C73F-6EAD-4D0B-AAAE-37D5A6E4BC86}" EndProject @@ -92,7 +92,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PDFAConverter", "DocumentCo EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PDFXConverter", "DocumentConversion\PDFXConverter\PDFXConverter.csproj", "{AC0B6462-750A-4DF6-BB63-29878969670D}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZUGFeRDConverter", "DocumentConversion\ZUGFeRDConverter\ZUGFeRDConverter.csproj", "{7e090b4f-0db4-4c40-a48a-40c0111019d5}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZUGFeRDConverter", "DocumentConversion\ZUGFeRDConverter\ZUGFeRDConverter.csproj", "{7CA392CB-AFD3-4BD8-B3B5-C634A8A51F74}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PDFOptimize", "DocumentOptimization\PDFOptimize\PDFOptimize.csproj", "{05B2CC4F-FCF5-46B2-89FC-0B5ECCD061DF}" EndProject @@ -134,9 +134,9 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ListPaths", "InformationExt EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Metadata", "InformationExtraction\Metadata\Metadata.csproj", "{61313430-5B85-4600-A2AE-5B61C138D70D}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AddTextToDocument", "OpticalCharacterRecognition\AddTextToDocument\AddTextToDocument.csproj", "{F69F3E92-2388-4702-813C-CE25CCB3FAEC} +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AddTextToDocument", "OpticalCharacterRecognition\AddTextToDocument\AddTextToDocument.csproj", "{F69F3E92-2388-4702-813C-CE25CCB3FAEC}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AddTextToImage", "OpticalCharacterRecognition\AddTextToImage\AddTextToImage.csproj", "{a1a2f184-6250-4843-8d6b-3a72776dd27d}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AddTextToImage", "OpticalCharacterRecognition\AddTextToImage\AddTextToImage.csproj", "{7B949A55-4748-4B93-A9D7-AE6555648A79}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OCRDocument", "OpticalCharacterRecognition\OCRDocument\OCRDocument.csproj", "{C9DD37F3-545F-4346-8EF2-FAE2DD20FDCF}" EndProject @@ -166,7 +166,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExtractTextByPatternMatch", EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExtractTextByRegion", "Text\ExtractTextByRegion\ExtractTextByRegion.csproj", "{4E8C26AF-67B3-48CF-9A5F-E83E5EFD3498}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExtractTextFromAnnotations", "Text\ExtractTextFromAnnotations\ExtractTextFromAnnotations.csproj", "{05B2CC4F-FCF5-46B2-89FC-0B5ECCD061DF}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExtractTextFromAnnotations", "Text\ExtractTextFromAnnotations\ExtractTextFromAnnotations.csproj", "{28F740D7-D28F-458F-A9A4-903CC1310558}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExtractTextFromMultiRegions", "Text\ExtractTextFromMultiRegions\ExtractTextFromMultiRegions.csproj", "{301D53BD-5506-4040-8E77-6C260A4AB0A2}" EndProject @@ -180,7 +180,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RegexTextSearch", "Text\Reg EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TextExtract", "Text\TextExtract\TextExtract.csproj", "{11C4A647-3DDA-41A5-855C-E14EDF1BFFDE}" EndProject - +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AddDigitalSignature", "Security\AddDigitalSignature\AddDigitalSignature.csproj", "{AB753937-DF3D-4B06-B475-D3B597D32BC5}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x64 = Debug|x64 @@ -223,10 +224,10 @@ Global {157F72BC-DCD4-496B-A5EE-FC50AADAFA3F}.Debug|x64.Build.0 = Debug|x64 {157F72BC-DCD4-496B-A5EE-FC50AADAFA3F}.Release|x64.ActiveCfg = Release|x64 {157F72BC-DCD4-496B-A5EE-FC50AADAFA3F}.Release|x64.Build.0 = Release|x64 - {64dbb1f8-8ccf-40ec-8eb1-dde0b3586595}.Debug|x64.ActiveCfg = Debug|x64 - {64dbb1f8-8ccf-40ec-8eb1-dde0b3586595}.Debug|x64.Build.0 = Debug|x64 - {64dbb1f8-8ccf-40ec-8eb1-dde0b3586595}.Release|x64.ActiveCfg = Release|x64 - {64dbb1f8-8ccf-40ec-8eb1-dde0b3586595}.Release|x64.Build.0 = Release|x64 + {64DBB1F8-8CCF-40EC-8EB1-DDE0B3586595}.Debug|x64.ActiveCfg = Debug|x64 + {64DBB1F8-8CCF-40EC-8EB1-DDE0B3586595}.Debug|x64.Build.0 = Debug|x64 + {64DBB1F8-8CCF-40EC-8EB1-DDE0B3586595}.Release|x64.ActiveCfg = Release|x64 + {64DBB1F8-8CCF-40EC-8EB1-DDE0B3586595}.Release|x64.Build.0 = Release|x64 {6D9CDBE3-17B7-4337-BD9D-DAA378791244}.Debug|x64.ActiveCfg = Debug|x64 {6D9CDBE3-17B7-4337-BD9D-DAA378791244}.Debug|x64.Build.0 = Debug|x64 {6D9CDBE3-17B7-4337-BD9D-DAA378791244}.Release|x64.ActiveCfg = Release|x64 @@ -275,10 +276,6 @@ Global {3A7670C4-BE60-4AE8-8E79-8281206BB4DA}.Debug|x64.Build.0 = Debug|x64 {3A7670C4-BE60-4AE8-8E79-8281206BB4DA}.Release|x64.ActiveCfg = Release|x64 {3A7670C4-BE60-4AE8-8E79-8281206BB4DA}.Release|x64.Build.0 = Release|x64 - {C5493EAE-45F6-4502-9D26-5BFEC574729F}.Debug|x64.ActiveCfg = Debug|x64 - {C5493EAE-45F6-4502-9D26-5BFEC574729F}.Debug|x64.Build.0 = Debug|x64 - {C5493EAE-45F6-4502-9D26-5BFEC574729F}.Release|x64.ActiveCfg = Release|x64 - {C5493EAE-45F6-4502-9D26-5BFEC574729F}.Release|x64.Build.0 = Release|x64 {BEC20051-FF71-42FA-B46A-0909ECE10765}.Debug|x64.ActiveCfg = Debug|x64 {BEC20051-FF71-42FA-B46A-0909ECE10765}.Debug|x64.Build.0 = Debug|x64 {BEC20051-FF71-42FA-B46A-0909ECE10765}.Release|x64.ActiveCfg = Release|x64 @@ -287,6 +284,10 @@ Global {C5493EAE-45F6-4502-9D26-5BFEC574729F}.Debug|x64.Build.0 = Debug|x64 {C5493EAE-45F6-4502-9D26-5BFEC574729F}.Release|x64.ActiveCfg = Release|x64 {C5493EAE-45F6-4502-9D26-5BFEC574729F}.Release|x64.Build.0 = Release|x64 + {E2C4287F-5817-49CE-912D-9A9F29DBC0DD}.Debug|x64.ActiveCfg = Debug|x64 + {E2C4287F-5817-49CE-912D-9A9F29DBC0DD}.Debug|x64.Build.0 = Debug|x64 + {E2C4287F-5817-49CE-912D-9A9F29DBC0DD}.Release|x64.ActiveCfg = Release|x64 + {E2C4287F-5817-49CE-912D-9A9F29DBC0DD}.Release|x64.Build.0 = Release|x64 {8781C73F-6EAD-4D0B-AAAE-37D5A6E4BC86}.Debug|x64.ActiveCfg = Debug|x64 {8781C73F-6EAD-4D0B-AAAE-37D5A6E4BC86}.Debug|x64.Build.0 = Debug|x64 {8781C73F-6EAD-4D0B-AAAE-37D5A6E4BC86}.Release|x64.ActiveCfg = Release|x64 @@ -347,10 +348,18 @@ Global {D0E85D80-0332-40F2-A9DB-43C02F4544BC}.Debug|x64.Build.0 = Debug|x64 {D0E85D80-0332-40F2-A9DB-43C02F4544BC}.Release|x64.ActiveCfg = Release|x64 {D0E85D80-0332-40F2-A9DB-43C02F4544BC}.Release|x64.Build.0 = Release|x64 + {AECC2C27-D343-4E42-9097-121AFAA4B386}.Debug|x64.ActiveCfg = Debug|x64 + {AECC2C27-D343-4E42-9097-121AFAA4B386}.Debug|x64.Build.0 = Debug|x64 + {AECC2C27-D343-4E42-9097-121AFAA4B386}.Release|x64.ActiveCfg = Release|x64 + {AECC2C27-D343-4E42-9097-121AFAA4B386}.Release|x64.Build.0 = Release|x64 {6A1D00B1-DA53-4BB5-B7F7-1EB1339C379B}.Debug|x64.ActiveCfg = Debug|x64 {6A1D00B1-DA53-4BB5-B7F7-1EB1339C379B}.Debug|x64.Build.0 = Debug|x64 {6A1D00B1-DA53-4BB5-B7F7-1EB1339C379B}.Release|x64.ActiveCfg = Release|x64 {6A1D00B1-DA53-4BB5-B7F7-1EB1339C379B}.Release|x64.Build.0 = Release|x64 + {D5F40E4D-BDEF-4472-909A-C6441B594750}.Debug|x64.ActiveCfg = Debug|x64 + {D5F40E4D-BDEF-4472-909A-C6441B594750}.Debug|x64.Build.0 = Debug|x64 + {D5F40E4D-BDEF-4472-909A-C6441B594750}.Release|x64.ActiveCfg = Release|x64 + {D5F40E4D-BDEF-4472-909A-C6441B594750}.Release|x64.Build.0 = Release|x64 {6E7363CC-D687-43A0-A6F6-7E408B06446B}.Debug|x64.ActiveCfg = Debug|x64 {6E7363CC-D687-43A0-A6F6-7E408B06446B}.Debug|x64.Build.0 = Debug|x64 {6E7363CC-D687-43A0-A6F6-7E408B06446B}.Release|x64.ActiveCfg = Release|x64 @@ -359,10 +368,10 @@ Global {AC0B6462-750A-4DF6-BB63-29878969670D}.Debug|x64.Build.0 = Debug|x64 {AC0B6462-750A-4DF6-BB63-29878969670D}.Release|x64.ActiveCfg = Release|x64 {AC0B6462-750A-4DF6-BB63-29878969670D}.Release|x64.Build.0 = Release|x64 - {7e090b4f-0db4-4c40-a48a-40c0111019d5}.Debug|x64.ActiveCfg = Debug|x64 - {7e090b4f-0db4-4c40-a48a-40c0111019d5}.Debug|x64.Build.0 = Debug|x64 - {7e090b4f-0db4-4c40-a48a-40c0111019d5}.Release|x64.ActiveCfg = Release|x64 - {7e090b4f-0db4-4c40-a48a-40c0111019d5}.Release|x64.Build.0 = Release|x64 + {7CA392CB-AFD3-4BD8-B3B5-C634A8A51F74}.Debug|x64.ActiveCfg = Debug|x64 + {7CA392CB-AFD3-4BD8-B3B5-C634A8A51F74}.Debug|x64.Build.0 = Debug|x64 + {7CA392CB-AFD3-4BD8-B3B5-C634A8A51F74}.Release|x64.ActiveCfg = Release|x64 + {7CA392CB-AFD3-4BD8-B3B5-C634A8A51F74}.Release|x64.Build.0 = Release|x64 {05B2CC4F-FCF5-46B2-89FC-0B5ECCD061DF}.Debug|x64.ActiveCfg = Debug|x64 {05B2CC4F-FCF5-46B2-89FC-0B5ECCD061DF}.Debug|x64.Build.0 = Debug|x64 {05B2CC4F-FCF5-46B2-89FC-0B5ECCD061DF}.Release|x64.ActiveCfg = Release|x64 @@ -387,10 +396,6 @@ Global {16ABC796-99B8-AEC6-947E-3355E8E6B090}.Debug|x64.Build.0 = Debug|x64 {16ABC796-99B8-AEC6-947E-3355E8E6B090}.Release|x64.ActiveCfg = Release|x64 {16ABC796-99B8-AEC6-947E-3355E8E6B090}.Release|x64.Build.0 = Release|x64 - {7B383C18-C183-4549-A5BF-CC488A08DF52}.Debug|x64.ActiveCfg = Debug|x64 - {7B383C18-C183-4549-A5BF-CC488A08DF52}.Debug|x64.Build.0 = Debug|x64 - {7B383C18-C183-4549-A5BF-CC488A08DF52}.Release|x64.ActiveCfg = Release|x64 - {7B383C18-C183-4549-A5BF-CC488A08DF52}.Release|x64.Build.0 = Release|x64 {74C32226-7701-46C4-A3EE-79FBF97F5A25}.Debug|x64.ActiveCfg = Debug|x64 {74C32226-7701-46C4-A3EE-79FBF97F5A25}.Debug|x64.Build.0 = Debug|x64 {74C32226-7701-46C4-A3EE-79FBF97F5A25}.Release|x64.ActiveCfg = Release|x64 @@ -419,6 +424,10 @@ Global {B521056A-B3B0-43C1-8374-1FD66DE7F1BA}.Debug|x64.Build.0 = Debug|x64 {B521056A-B3B0-43C1-8374-1FD66DE7F1BA}.Release|x64.ActiveCfg = Release|x64 {B521056A-B3B0-43C1-8374-1FD66DE7F1BA}.Release|x64.Build.0 = Release|x64 + {7B383C18-C183-4549-A5BF-CC488A08DF52}.Debug|x64.ActiveCfg = Debug|x64 + {7B383C18-C183-4549-A5BF-CC488A08DF52}.Debug|x64.Build.0 = Debug|x64 + {7B383C18-C183-4549-A5BF-CC488A08DF52}.Release|x64.ActiveCfg = Release|x64 + {7B383C18-C183-4549-A5BF-CC488A08DF52}.Release|x64.Build.0 = Release|x64 {A96AB9D0-86A5-4ADF-A222-BC91924BC5FA}.Debug|x64.ActiveCfg = Debug|x64 {A96AB9D0-86A5-4ADF-A222-BC91924BC5FA}.Debug|x64.Build.0 = Debug|x64 {A96AB9D0-86A5-4ADF-A222-BC91924BC5FA}.Release|x64.ActiveCfg = Release|x64 @@ -447,10 +456,10 @@ Global {F69F3E92-2388-4702-813C-CE25CCB3FAEC}.Debug|x64.Build.0 = Debug|x64 {F69F3E92-2388-4702-813C-CE25CCB3FAEC}.Release|x64.ActiveCfg = Release|x64 {F69F3E92-2388-4702-813C-CE25CCB3FAEC}.Release|x64.Build.0 = Release|x64 - {a1a2f184-6250-4843-8d6b-3a72776dd27d}.Debug|x64.ActiveCfg = Debug|x64 - {a1a2f184-6250-4843-8d6b-3a72776dd27d}.Debug|x64.Build.0 = Debug|x64 - {a1a2f184-6250-4843-8d6b-3a72776dd27d}.Release|x64.ActiveCfg = Release|x64 - {a1a2f184-6250-4843-8d6b-3a72776dd27d}.Release|x64.Build.0 = Release|x64 + {7B949A55-4748-4B93-A9D7-AE6555648A79}.Debug|x64.ActiveCfg = Debug|x64 + {7B949A55-4748-4B93-A9D7-AE6555648A79}.Debug|x64.Build.0 = Debug|x64 + {7B949A55-4748-4B93-A9D7-AE6555648A79}.Release|x64.ActiveCfg = Release|x64 + {7B949A55-4748-4B93-A9D7-AE6555648A79}.Release|x64.Build.0 = Release|x64 {C9DD37F3-545F-4346-8EF2-FAE2DD20FDCF}.Debug|x64.ActiveCfg = Debug|x64 {C9DD37F3-545F-4346-8EF2-FAE2DD20FDCF}.Debug|x64.Build.0 = Debug|x64 {C9DD37F3-545F-4346-8EF2-FAE2DD20FDCF}.Release|x64.ActiveCfg = Release|x64 @@ -471,6 +480,10 @@ Global {12C14641-90FA-4982-B03F-4E25C3D03256}.Debug|x64.Build.0 = Debug|x64 {12C14641-90FA-4982-B03F-4E25C3D03256}.Release|x64.ActiveCfg = Release|x64 {12C14641-90FA-4982-B03F-4E25C3D03256}.Release|x64.Build.0 = Release|x64 + {547F12BC-E6F0-4395-B1CC-EA5AE2900990}.Debug|x64.ActiveCfg = Debug|x64 + {547F12BC-E6F0-4395-B1CC-EA5AE2900990}.Debug|x64.Build.0 = Debug|x64 + {547F12BC-E6F0-4395-B1CC-EA5AE2900990}.Release|x64.ActiveCfg = Release|x64 + {547F12BC-E6F0-4395-B1CC-EA5AE2900990}.Release|x64.Build.0 = Release|x64 {3790CE63-DB43-4F16-8226-BDFEFA25BCDD}.Debug|x64.ActiveCfg = Debug|x64 {3790CE63-DB43-4F16-8226-BDFEFA25BCDD}.Debug|x64.Build.0 = Debug|x64 {3790CE63-DB43-4F16-8226-BDFEFA25BCDD}.Release|x64.ActiveCfg = Release|x64 @@ -487,42 +500,6 @@ Global {09F9D4AC-3BED-45C5-9325-F33A7F898F06}.Debug|x64.Build.0 = Debug|x64 {09F9D4AC-3BED-45C5-9325-F33A7F898F06}.Release|x64.ActiveCfg = Release|x64 {09F9D4AC-3BED-45C5-9325-F33A7F898F06}.Release|x64.Build.0 = Release|x64 - {7801882E-1CF5-49C4-A4FE-34ED5F4901E5}.Debug|x64.ActiveCfg = Debug|x64 - {7801882E-1CF5-49C4-A4FE-34ED5F4901E5}.Debug|x64.Build.0 = Debug|x64 - {7801882E-1CF5-49C4-A4FE-34ED5F4901E5}.Release|x64.ActiveCfg = Release|x64 - {7801882E-1CF5-49C4-A4FE-34ED5F4901E5}.Release|x64.Build.0 = Release|x64 - {11C4A647-3DDA-41A5-855C-E14EDF1BFFDE}.Debug|x64.ActiveCfg = Debug|x64 - {11C4A647-3DDA-41A5-855C-E14EDF1BFFDE}.Debug|x64.Build.0 = Debug|x64 - {11C4A647-3DDA-41A5-855C-E14EDF1BFFDE}.Release|x64.ActiveCfg = Release|x64 - {11C4A647-3DDA-41A5-855C-E14EDF1BFFDE}.Release|x64.Build.0 = Release|x64 - {FA30AB74-525F-42BC-BF43-B07AD7C94BC1}.Debug|x64.ActiveCfg = Debug|x64 - {FA30AB74-525F-42BC-BF43-B07AD7C94BC1}.Debug|x64.Build.0 = Debug|x64 - {FA30AB74-525F-42BC-BF43-B07AD7C94BC1}.Release|x64.ActiveCfg = Release|x64 - {FA30AB74-525F-42BC-BF43-B07AD7C94BC1}.Release|x64.Build.0 = Release|x64 - {547F12BC-E6F0-4395-B1CC-EA5AE2900990}.Debug|x64.ActiveCfg = Debug|x64 - {547F12BC-E6F0-4395-B1CC-EA5AE2900990}.Debug|x64.Build.0 = Debug|x64 - {547F12BC-E6F0-4395-B1CC-EA5AE2900990}.Release|x64.ActiveCfg = Release|x64 - {547F12BC-E6F0-4395-B1CC-EA5AE2900990}.Release|x64.Build.0 = Release|x64 - {6712DB77-75AB-4E71-BF38-05BD698A1A2C}.Debug|x64.ActiveCfg = Debug|x64 - {6712DB77-75AB-4E71-BF38-05BD698A1A2C}.Debug|x64.Build.0 = Debug|x64 - {6712DB77-75AB-4E71-BF38-05BD698A1A2C}.Release|x64.ActiveCfg = Release|x64 - {6712DB77-75AB-4E71-BF38-05BD698A1A2C}.Release|x64.Build.0 = Release|x64 - {4E8C26AF-67B3-48CF-9A5F-E83E5EFD3498}.Debug|x64.ActiveCfg = Debug|x64 - {4E8C26AF-67B3-48CF-9A5F-E83E5EFD3498}.Debug|x64.Build.0 = Debug|x64 - {4E8C26AF-67B3-48CF-9A5F-E83E5EFD3498}.Release|x64.ActiveCfg = Release|x64 - {4E8C26AF-67B3-48CF-9A5F-E83E5EFD3498}.Release|x64.Build.0 = Release|x64 - {7F947745-7A22-4CCB-8B38-E16A1E780819}.Debug|x64.ActiveCfg = Debug|x64 - {7F947745-7A22-4CCB-8B38-E16A1E780819}.Debug|x64.Build.0 = Debug|x64 - {7F947745-7A22-4CCB-8B38-E16A1E780819}.Release|x64.ActiveCfg = Release|x64 - {7F947745-7A22-4CCB-8B38-E16A1E780819}.Release|x64.Build.0 = Release|x64 - {05B2CC4F-FCF5-46B2-89FC-0B5ECCD061DF}.Debug|x64.ActiveCfg = Debug|x64 - {05B2CC4F-FCF5-46B2-89FC-0B5ECCD061DF}.Debug|x64.Build.0 = Debug|x64 - {05B2CC4F-FCF5-46B2-89FC-0B5ECCD061DF}.Release|x64.ActiveCfg = Release|x64 - {05B2CC4F-FCF5-46B2-89FC-0B5ECCD061DF}.Release|x64.Build.0 = Release|x64 - {301D53BD-5506-4040-8E77-6C260A4AB0A2}.Debug|x64.ActiveCfg = Debug|x64 - {301D53BD-5506-4040-8E77-6C260A4AB0A2}.Debug|x64.Build.0 = Debug|x64 - {301D53BD-5506-4040-8E77-6C260A4AB0A2}.Release|x64.ActiveCfg = Release|x64 - {301D53BD-5506-4040-8E77-6C260A4AB0A2}.Release|x64.Build.0 = Release|x64 {AFDE3185-80DA-4EF9-8DE5-7E6E80F396A7}.Debug|x64.ActiveCfg = Debug|x64 {AFDE3185-80DA-4EF9-8DE5-7E6E80F396A7}.Debug|x64.Build.0 = Debug|x64 {AFDE3185-80DA-4EF9-8DE5-7E6E80F396A7}.Release|x64.ActiveCfg = Release|x64 @@ -531,18 +508,46 @@ Global {990A5B2F-B22D-49AA-840F-712CAFBEDC71}.Debug|x64.Build.0 = Debug|x64 {990A5B2F-B22D-49AA-840F-712CAFBEDC71}.Release|x64.ActiveCfg = Release|x64 {990A5B2F-B22D-49AA-840F-712CAFBEDC71}.Release|x64.Build.0 = Release|x64 + {7F947745-7A22-4CCB-8B38-E16A1E780819}.Debug|x64.ActiveCfg = Debug|x64 + {7F947745-7A22-4CCB-8B38-E16A1E780819}.Debug|x64.Build.0 = Debug|x64 + {7F947745-7A22-4CCB-8B38-E16A1E780819}.Release|x64.ActiveCfg = Release|x64 + {7F947745-7A22-4CCB-8B38-E16A1E780819}.Release|x64.Build.0 = Release|x64 + {4E8C26AF-67B3-48CF-9A5F-E83E5EFD3498}.Debug|x64.ActiveCfg = Debug|x64 + {4E8C26AF-67B3-48CF-9A5F-E83E5EFD3498}.Debug|x64.Build.0 = Debug|x64 + {4E8C26AF-67B3-48CF-9A5F-E83E5EFD3498}.Release|x64.ActiveCfg = Release|x64 + {4E8C26AF-67B3-48CF-9A5F-E83E5EFD3498}.Release|x64.Build.0 = Release|x64 + {28F740D7-D28F-458F-A9A4-903CC1310558}.Debug|x64.ActiveCfg = Debug|x64 + {28F740D7-D28F-458F-A9A4-903CC1310558}.Debug|x64.Build.0 = Debug|x64 + {28F740D7-D28F-458F-A9A4-903CC1310558}.Release|x64.ActiveCfg = Release|x64 + {28F740D7-D28F-458F-A9A4-903CC1310558}.Release|x64.Build.0 = Release|x64 + {301D53BD-5506-4040-8E77-6C260A4AB0A2}.Debug|x64.ActiveCfg = Debug|x64 + {301D53BD-5506-4040-8E77-6C260A4AB0A2}.Debug|x64.Build.0 = Debug|x64 + {301D53BD-5506-4040-8E77-6C260A4AB0A2}.Release|x64.ActiveCfg = Release|x64 + {301D53BD-5506-4040-8E77-6C260A4AB0A2}.Release|x64.Build.0 = Release|x64 {6D01CAFD-C868-4F75-9B88-6EC1074F7AE3}.Debug|x64.ActiveCfg = Debug|x64 {6D01CAFD-C868-4F75-9B88-6EC1074F7AE3}.Debug|x64.Build.0 = Debug|x64 {6D01CAFD-C868-4F75-9B88-6EC1074F7AE3}.Release|x64.ActiveCfg = Release|x64 {6D01CAFD-C868-4F75-9B88-6EC1074F7AE3}.Release|x64.Build.0 = Release|x64 - {D5F40E4D-BDEF-4472-909A-C6441B594750}.Debug|x64.ActiveCfg = Debug|x64 - {D5F40E4D-BDEF-4472-909A-C6441B594750}.Debug|x64.Build.0 = Debug|x64 - {D5F40E4D-BDEF-4472-909A-C6441B594750}.Release|x64.ActiveCfg = Release|x64 - {D5F40E4D-BDEF-4472-909A-C6441B594750}.Release|x64.Build.0 = Release|x64 - {AECC2C27-D343-4E42-9097-121AFAA4B386}.Debug|x64.ActiveCfg = Debug|x64 - {AECC2C27-D343-4E42-9097-121AFAA4B386}.Debug|x64.Build.0 = Debug|x64 - {AECC2C27-D343-4E42-9097-121AFAA4B386}.Release|x64.ActiveCfg = Release|x64 - {AECC2C27-D343-4E42-9097-121AFAA4B386}.Release|x64.Build.0 = Release|x64 + {7801882E-1CF5-49C4-A4FE-34ED5F4901E5}.Debug|x64.ActiveCfg = Debug|x64 + {7801882E-1CF5-49C4-A4FE-34ED5F4901E5}.Debug|x64.Build.0 = Debug|x64 + {7801882E-1CF5-49C4-A4FE-34ED5F4901E5}.Release|x64.ActiveCfg = Release|x64 + {7801882E-1CF5-49C4-A4FE-34ED5F4901E5}.Release|x64.Build.0 = Release|x64 + {6712DB77-75AB-4E71-BF38-05BD698A1A2C}.Debug|x64.ActiveCfg = Debug|x64 + {6712DB77-75AB-4E71-BF38-05BD698A1A2C}.Debug|x64.Build.0 = Debug|x64 + {6712DB77-75AB-4E71-BF38-05BD698A1A2C}.Release|x64.ActiveCfg = Release|x64 + {6712DB77-75AB-4E71-BF38-05BD698A1A2C}.Release|x64.Build.0 = Release|x64 + {FA30AB74-525F-42BC-BF43-B07AD7C94BC1}.Debug|x64.ActiveCfg = Debug|x64 + {FA30AB74-525F-42BC-BF43-B07AD7C94BC1}.Debug|x64.Build.0 = Debug|x64 + {FA30AB74-525F-42BC-BF43-B07AD7C94BC1}.Release|x64.ActiveCfg = Release|x64 + {FA30AB74-525F-42BC-BF43-B07AD7C94BC1}.Release|x64.Build.0 = Release|x64 + {11C4A647-3DDA-41A5-855C-E14EDF1BFFDE}.Debug|x64.ActiveCfg = Debug|x64 + {11C4A647-3DDA-41A5-855C-E14EDF1BFFDE}.Debug|x64.Build.0 = Debug|x64 + {11C4A647-3DDA-41A5-855C-E14EDF1BFFDE}.Release|x64.ActiveCfg = Release|x64 + {11C4A647-3DDA-41A5-855C-E14EDF1BFFDE}.Release|x64.Build.0 = Release|x64 + {AB753937-DF3D-4B06-B475-D3B597D32BC5}.Debug|x64.ActiveCfg = Debug|x64 + {AB753937-DF3D-4B06-B475-D3B597D32BC5}.Debug|x64.Build.0 = Debug|x64 + {AB753937-DF3D-4B06-B475-D3B597D32BC5}.Release|x64.ActiveCfg = Release|x64 + {AB753937-DF3D-4B06-B475-D3B597D32BC5}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Security/AddDigitalSignature/AddDigitalSignature.csproj b/Security/AddDigitalSignature/AddDigitalSignature.csproj index 0e49989..866e62e 100644 --- a/Security/AddDigitalSignature/AddDigitalSignature.csproj +++ b/Security/AddDigitalSignature/AddDigitalSignature.csproj @@ -4,7 +4,7 @@ Debug x64 - {3790CE63-DB43-4F16-8226-BDFEFA25BCDD} + {AB753937-DF3D-4B06-B475-D3B597D32BC5} Exe AddDigitalSignature AddDigitalSignature diff --git a/Security/AddDigitalSignature/AddDigitalSignature.sln b/Security/AddDigitalSignature/AddDigitalSignature.sln new file mode 100644 index 0000000..fb572c5 --- /dev/null +++ b/Security/AddDigitalSignature/AddDigitalSignature.sln @@ -0,0 +1,24 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.13.35818.85 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AddDigitalSignature", "AddDigitalSignature.csproj", "{3790CE63-DB43-4F16-8226-BDFEFA25BCDD}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3790CE63-DB43-4F16-8226-BDFEFA25BCDD}.Debug|x64.ActiveCfg = Debug|x64 + {3790CE63-DB43-4F16-8226-BDFEFA25BCDD}.Debug|x64.Build.0 = Debug|x64 + {3790CE63-DB43-4F16-8226-BDFEFA25BCDD}.Release|x64.ActiveCfg = Release|x64 + {3790CE63-DB43-4F16-8226-BDFEFA25BCDD}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {08DC1B85-4756-4272-B76A-197A8E79394D} + EndGlobalSection +EndGlobal diff --git a/Text/ExtractTextFromAnnotations/ExtractTextFromAnnotations.csproj b/Text/ExtractTextFromAnnotations/ExtractTextFromAnnotations.csproj index 5829092..eaef63f 100644 --- a/Text/ExtractTextFromAnnotations/ExtractTextFromAnnotations.csproj +++ b/Text/ExtractTextFromAnnotations/ExtractTextFromAnnotations.csproj @@ -4,7 +4,7 @@ Debug x64 - {05B2CC4F-FCF5-46B2-89FC-0B5ECCD061DF} + {28F740D7-D28F-458F-A9A4-903CC1310558} Exe ExtractTextFromAnnotations ExtractTextFromAnnotations @@ -59,4 +59,4 @@ - + \ No newline at end of file From c38a893598eb364a80fb495d14d45997429a2dfd Mon Sep 17 00:00:00 2001 From: bruceh Date: Thu, 8 May 2025 15:57:28 -0500 Subject: [PATCH 5/6] Fix Cert file location and float of opacity --- Security/AddDigitalSignature/AddDigitalSignature.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Security/AddDigitalSignature/AddDigitalSignature.cs b/Security/AddDigitalSignature/AddDigitalSignature.cs index ad2e589..7268e30 100644 --- a/Security/AddDigitalSignature/AddDigitalSignature.cs +++ b/Security/AddDigitalSignature/AddDigitalSignature.cs @@ -26,6 +26,9 @@ static void Main(string[] args) String sLogo = Library.ResourceDirectory + "Sample_Input/ducky_alpha.tif"; String sOutput = "DigSig-out.pdf"; + String sDERCert = Library.ResourceDirectory + "Sample_Input/Credentials/DER/RSA_certificate.der"; + String sDERKey = Library.ResourceDirectory + "Sample_Input/Credentials/DER/RSA_privKey.der"; + if (args.Length > 0) sInput = args[0]; @@ -49,12 +52,12 @@ static void Main(string[] args) // Set credential related attributes sigDoc.DigestCategory = DigestCategory.Sha256; sigDoc.CredentialDataFormat = CredentialDataFmt.NonPFX; - sigDoc.SetNonPfxSignerCert("Credentials/DER/RSA_certificate.der", 0, CredentialStorageFmt.OnDisk); - sigDoc.SetNonPfxPrivateKey("Credentials/DER/RSA_privKey.der", 0, CredentialStorageFmt.OnDisk); + sigDoc.SetNonPfxSignerCert(sDERCert, 0, CredentialStorageFmt.OnDisk); + sigDoc.SetNonPfxPrivateKey(sDERKey, 0, CredentialStorageFmt.OnDisk); // Setup the signer information // (Logo image is optional) - sigDoc.SetSignerInfo(sOutput, 0.5, "John Doe", "Chicago, IL", "Approval", "Datalogics, Inc.", + sigDoc.SetSignerInfo(sOutput, 0.5F, "John Doe", "Chicago, IL", "Approval", "Datalogics, Inc.", DisplayTraits.KDisplayAll); // Set the size and location of the signature box (optional) From 4c4283a5425417eb9e0e5b7c8d5dfa04c9856a8d Mon Sep 17 00:00:00 2001 From: bruceh Date: Thu, 8 May 2025 17:13:31 -0500 Subject: [PATCH 6/6] Fix logo path --- Security/AddDigitalSignature/AddDigitalSignature.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Security/AddDigitalSignature/AddDigitalSignature.cs b/Security/AddDigitalSignature/AddDigitalSignature.cs index 7268e30..cfdd689 100644 --- a/Security/AddDigitalSignature/AddDigitalSignature.cs +++ b/Security/AddDigitalSignature/AddDigitalSignature.cs @@ -57,7 +57,7 @@ static void Main(string[] args) // Setup the signer information // (Logo image is optional) - sigDoc.SetSignerInfo(sOutput, 0.5F, "John Doe", "Chicago, IL", "Approval", "Datalogics, Inc.", + sigDoc.SetSignerInfo(sLogo, 0.5F, "John Doe", "Chicago, IL", "Approval", "Datalogics, Inc.", DisplayTraits.KDisplayAll); // Set the size and location of the signature box (optional)