diff --git a/Compression/Compress-the-existing-PDF-document/.NET/Compress-the-existing-PDF-document/Data/Output.pdf b/Compression/Compress-the-existing-PDF-document/.NET/Compress-the-existing-PDF-document/Data/Output.pdf new file mode 100644 index 00000000..b4864b48 Binary files /dev/null and b/Compression/Compress-the-existing-PDF-document/.NET/Compress-the-existing-PDF-document/Data/Output.pdf differ diff --git a/Compression/Compress-the-existing-PDF-document/.NET/Compress-the-existing-PDF-document/README.md b/Compression/Compress-the-existing-PDF-document/.NET/Compress-the-existing-PDF-document/README.md index d7f77cbe..ac2d94c4 100644 --- a/Compression/Compress-the-existing-PDF-document/.NET/Compress-the-existing-PDF-document/README.md +++ b/Compression/Compress-the-existing-PDF-document/.NET/Compress-the-existing-PDF-document/README.md @@ -20,7 +20,7 @@ Step 3: **Add required namespaces**: Include the following namespaces in your `P Step 4: **Implement PDF compression**: Use the following code snippet in `Program.cs` to compress PDF files: ```csharp - // Open a file stream to read the input PDF file + // Open a file stream to read the input PDF file using (FileStream fileStream = new FileStream("Input.pdf", FileMode.Open, FileAccess.Read)) { // Load the PDF document from the file stream @@ -28,23 +28,23 @@ Step 4: **Implement PDF compression**: Use the following code snippet in `Progra { // Create a new PdfCompressionOptions object PdfCompressionOptions options = new PdfCompressionOptions(); - + // Enable image compression and set the image quality options.CompressImages = true; options.ImageQuality = 50; - + // Enable font optimization options.OptimizeFont = true; - + // Enable page content optimization options.OptimizePageContents = true; - + // Remove metadata from the PDF options.RemoveMetadata = true; - + // Compress the PDF document loadedDocument.Compress(options); - + // Save the document into a memory stream using (MemoryStream outputStream = new MemoryStream()) { diff --git a/Digital Signature/Add-a-digital-signature-to-an-existing-document/.NET/Add-a-digital-signature-to-an-existing-document/Data/Input.pdf b/Digital Signature/Add-a-digital-signature-to-an-existing-document/.NET/Add-a-digital-signature-to-an-existing-document/Data/Input.pdf index 6d10bb53..267bf9ad 100644 Binary files a/Digital Signature/Add-a-digital-signature-to-an-existing-document/.NET/Add-a-digital-signature-to-an-existing-document/Data/Input.pdf and b/Digital Signature/Add-a-digital-signature-to-an-existing-document/.NET/Add-a-digital-signature-to-an-existing-document/Data/Input.pdf differ diff --git a/Digital Signature/Add-a-digital-signature-to-an-existing-document/.NET/Add-a-digital-signature-to-an-existing-document/Data/Output.pdf b/Digital Signature/Add-a-digital-signature-to-an-existing-document/.NET/Add-a-digital-signature-to-an-existing-document/Data/Output.pdf new file mode 100644 index 00000000..ae79e8d8 Binary files /dev/null and b/Digital Signature/Add-a-digital-signature-to-an-existing-document/.NET/Add-a-digital-signature-to-an-existing-document/Data/Output.pdf differ diff --git a/Digital Signature/Add-a-digital-signature-to-an-existing-document/.NET/Add-a-digital-signature-to-an-existing-document/Program.cs b/Digital Signature/Add-a-digital-signature-to-an-existing-document/.NET/Add-a-digital-signature-to-an-existing-document/Program.cs index e6e0764f..d409580a 100644 --- a/Digital Signature/Add-a-digital-signature-to-an-existing-document/.NET/Add-a-digital-signature-to-an-existing-document/Program.cs +++ b/Digital Signature/Add-a-digital-signature-to-an-existing-document/.NET/Add-a-digital-signature-to-an-existing-document/Program.cs @@ -24,7 +24,7 @@ PdfSignature signature = new PdfSignature(loadedDocument, page, pdfCert, "Signature"); // Set signature information - signature.Bounds = new RectangleF(new PointF(0, 0), new SizeF(200, 100)); + signature.Bounds = new RectangleF(227.6355f, 675.795044f, 150.57901f, 32.58f); signature.ContactInfo = "johndoe@owned.us"; signature.LocationInfo = "Honolulu, Hawaii"; signature.Reason = "I am the author of this document."; diff --git a/Merge PDFs/Merge-multiple-documents-from-stream/.NET/Merge-multiple-documents-from-stream/Data/Output.pdf b/Merge PDFs/Merge-multiple-documents-from-stream/.NET/Merge-multiple-documents-from-stream/Data/Output.pdf new file mode 100644 index 00000000..806b5b41 Binary files /dev/null and b/Merge PDFs/Merge-multiple-documents-from-stream/.NET/Merge-multiple-documents-from-stream/Data/Output.pdf differ diff --git a/Merge PDFs/Merge-multiple-documents-from-stream/.NET/Merge-multiple-documents-from-stream/Data/file1.pdf b/Merge PDFs/Merge-multiple-documents-from-stream/.NET/Merge-multiple-documents-from-stream/Data/file1.pdf index 6d10bb53..dbaa850b 100644 Binary files a/Merge PDFs/Merge-multiple-documents-from-stream/.NET/Merge-multiple-documents-from-stream/Data/file1.pdf and b/Merge PDFs/Merge-multiple-documents-from-stream/.NET/Merge-multiple-documents-from-stream/Data/file1.pdf differ diff --git a/Redaction/Removing-sensitive-content-from-the-PDF-document/.NET/Removing-sensitive-content-from-the-PDF-document/Data/Output.pdf b/Redaction/Removing-sensitive-content-from-the-PDF-document/.NET/Removing-sensitive-content-from-the-PDF-document/Data/Output.pdf new file mode 100644 index 00000000..01a28703 Binary files /dev/null and b/Redaction/Removing-sensitive-content-from-the-PDF-document/.NET/Removing-sensitive-content-from-the-PDF-document/Data/Output.pdf differ