Skip to content

Commit 8df4a8b

Browse files
Merge pull request #129 from SyncfusionExamples/921492
921492 Updated output documents in interactive sample project
2 parents 1f6cf9e + 24c3e3c commit 8df4a8b

8 files changed

Lines changed: 8 additions & 8 deletions

File tree

  • Compression/Compress-the-existing-PDF-document/.NET/Compress-the-existing-PDF-document
  • Digital Signature/Add-a-digital-signature-to-an-existing-document/.NET/Add-a-digital-signature-to-an-existing-document
  • Merge PDFs/Merge-multiple-documents-from-stream/.NET/Merge-multiple-documents-from-stream/Data
  • Redaction/Removing-sensitive-content-from-the-PDF-document/.NET/Removing-sensitive-content-from-the-PDF-document/Data

Compression/Compress-the-existing-PDF-document/.NET/Compress-the-existing-PDF-document/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,31 +20,31 @@ Step 3: **Add required namespaces**: Include the following namespaces in your `P
2020
Step 4: **Implement PDF compression**: Use the following code snippet in `Program.cs` to compress PDF files:
2121

2222
```csharp
23-
// Open a file stream to read the input PDF file
23+
// Open a file stream to read the input PDF file
2424
using (FileStream fileStream = new FileStream("Input.pdf", FileMode.Open, FileAccess.Read))
2525
{
2626
// Load the PDF document from the file stream
2727
using (PdfLoadedDocument loadedDocument = new PdfLoadedDocument(fileStream))
2828
{
2929
// Create a new PdfCompressionOptions object
3030
PdfCompressionOptions options = new PdfCompressionOptions();
31-
31+
3232
// Enable image compression and set the image quality
3333
options.CompressImages = true;
3434
options.ImageQuality = 50;
35-
35+
3636
// Enable font optimization
3737
options.OptimizeFont = true;
38-
38+
3939
// Enable page content optimization
4040
options.OptimizePageContents = true;
41-
41+
4242
// Remove metadata from the PDF
4343
options.RemoveMetadata = true;
44-
44+
4545
// Compress the PDF document
4646
loadedDocument.Compress(options);
47-
47+
4848
// Save the document into a memory stream
4949
using (MemoryStream outputStream = new MemoryStream())
5050
{

Digital Signature/Add-a-digital-signature-to-an-existing-document/.NET/Add-a-digital-signature-to-an-existing-document/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
PdfSignature signature = new PdfSignature(loadedDocument, page, pdfCert, "Signature");
2525

2626
// Set signature information
27-
signature.Bounds = new RectangleF(new PointF(0, 0), new SizeF(200, 100));
27+
signature.Bounds = new RectangleF(227.6355f, 675.795044f, 150.57901f, 32.58f);
2828
signature.ContactInfo = "johndoe@owned.us";
2929
signature.LocationInfo = "Honolulu, Hawaii";
3030
signature.Reason = "I am the author of this document.";

0 commit comments

Comments
 (0)