Skip to content

Commit

Permalink
Merge pull request #118 from SyncfusionExamples/927524_ft
Browse files Browse the repository at this point in the history
927524_ft Resolved the FT readme alignment issue and output issues.
  • Loading branch information
chinnumuniyappan authored Dec 13, 2024
2 parents c8e70e9 + 8991f76 commit 86f86cc
Show file tree
Hide file tree
Showing 18 changed files with 90 additions and 87 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ The Syncfusion [.NET Core PDF library](https://www.syncfusion.com/document-proce

Follow these steps to compress PDF files using the Syncfusion library:

1. **Create a new project**: Set up a new C# Console Application project.
Step 1: **Create a new project**: Set up a new C# Console Application project.

2. **Install the NuGet package**: Add the [Syncfusion.Pdf.Net.Core](https://www.nuget.org/packages/Syncfusion.Pdf.Net.Core/) package to your project from [NuGet.org](https://www.nuget.org/).
Step 2: **Install the NuGet package**: Add the [Syncfusion.Pdf.Net.Core](https://www.nuget.org/packages/Syncfusion.Pdf.Net.Core/) package to your project from [NuGet.org](https://www.nuget.org/).

3. **Add required namespaces**: Include the following namespaces in your `Program.cs` file:
Step 3: **Add required namespaces**: Include the following namespaces in your `Program.cs` file:

```csharp
using Syncfusion.Pdf.Parsing;
using Syncfusion.Pdf;
```

4. **Implement PDF compression**: Use the following code snippet in `Program.cs` to compress PDF files:
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
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

using Syncfusion.Drawing;
using Syncfusion.Pdf;
using Syncfusion.Pdf.Graphics;
using Syncfusion.Pdf.Interactive;
using Syncfusion.Pdf.Parsing;
using Syncfusion.Pdf.Security;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,22 @@ The Syncfusion [.NET Core PDF library](https://www.syncfusion.com/document-proce

Follow these steps to digitally sign PDF files using the Syncfusion library:

1. **Create a new project**: Start by creating a new C# Console Application project.
Step 1: **Create a new project**: Start by creating a new C# Console Application project.

2. **Install the NuGet package**: Add the [Syncfusion.Pdf.Net.Core](https://www.nuget.org/packages/Syncfusion.Pdf.Net.Core/) package to your project from [NuGet.org](https://www.nuget.org/).
Step 2: **Install the NuGet package**: Add the [Syncfusion.Pdf.Net.Core](https://www.nuget.org/packages/Syncfusion.Pdf.Net.Core/) package to your project from [NuGet.org](https://www.nuget.org/).

3. **Include necessary namespaces**: Add the following namespaces in your `Program.cs` file:
Step 3: **Include necessary namespaces**: Add the following namespaces in your `Program.cs` file:

```csharp
using Syncfusion.Pdf;
using Syncfusion.Pdf.Graphics;
using Syncfusion.Pdf.Parsing;
using Syncfusion.Pdf.Security;
using Syncfusion.Drawing;
using Syncfusion.Pdf.Interactive;
```

4. **Add digital signature code**: Use the following code snippet in `Program.cs` to add a digital signature to a PDF file:
Step 4: **Add digital signature code**: Use the following code snippet in `Program.cs` to add a digital signature to a PDF file:

```csharp
// Open the existing PDF document as a stream
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ The Syncfusion [.NET Core PDF library](https://www.syncfusion.com/document-proce

Follow these steps to create a PDF form with a textbox field:

1. **Create a new project**: Start by creating a new C# Console Application project.
Step 1: **Create a new project**: Start by creating a new C# Console Application project.

2. **Install the NuGet package**: Add the [Syncfusion.Pdf.Net.Core](https://www.nuget.org/packages/Syncfusion.Pdf.Net.Core/) package to your project from [NuGet.org](https://www.nuget.org/).
Step 2: **Install the NuGet package**: Add the [Syncfusion.Pdf.Net.Core](https://www.nuget.org/packages/Syncfusion.Pdf.Net.Core/) package to your project from [NuGet.org](https://www.nuget.org/).

3. **Include necessary namespaces**: Add the following namespaces in your `Program.cs` file:
Step 3: **Include necessary namespaces**: Add the following namespaces in your `Program.cs` file:

```csharp
using Syncfusion.Drawing;
Expand All @@ -19,7 +19,7 @@ Follow these steps to create a PDF form with a textbox field:
using Syncfusion.Pdf.Interactive;
```

4. **Create PDF forms**: Implement the following code in `Program.cs` to add a textbox field to a PDF document:
Step 4: **Create PDF forms**: Implement the following code in `Program.cs` to add a textbox field to a PDF document:

```csharp
// Create a new PDF document
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ The Syncfusion [.NET Core PDF library](https://www.syncfusion.com/document-proce

Follow these steps to convert HTML content into a PDF file using the Syncfusion library:

1. **Create a new project**: Initialize a new C# Console Application project.
Step 1: **Create a new project**: Initialize a new C# Console Application project.

2. **Install the NuGet package**: Add the [Syncfusion.HtmlToPdfConverter.Net.Windows](https://www.nuget.org/packages/Syncfusion.HtmlToPdfConverter.Net.Windows) package as a reference in your .NET Standard application from [NuGet.org](https://www.nuget.org/).
Step 2: **Install the NuGet package**: Add the [Syncfusion.HtmlToPdfConverter.Net.Windows](https://www.nuget.org/packages/Syncfusion.HtmlToPdfConverter.Net.Windows) package as a reference in your .NET Standard application from [NuGet.org](https://www.nuget.org/).

3. **Include necessary namespaces**: Add the following namespaces in your `Program.cs` file:
Step 3: **Include necessary namespaces**: Add the following namespaces in your `Program.cs` file:

```csharp
using Syncfusion.HtmlConverter;
using Syncfusion.Pdf;
using System.Runtime.InteropServices;
```

4. **Convert HTML to PDF**: Implement the following code in `Program.cs` to convert a website URL to a PDF file:
Step 4: **Convert HTML to PDF**: Implement the following code in `Program.cs` to convert a website URL to a PDF file:

```csharp
// Initialize the HTML to PDF converter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ The Syncfusion [.NET Core PDF library](https://www.syncfusion.com/document-proce

Follow these steps to convert an image into a PDF file using the Syncfusion library:

1. **Create a new project**: Start a new C# Console Application project.
Step 1: **Create a new project**: Start a new C# Console Application project.

2. **Install the NuGet package**: Add the [Syncfusion.Pdf.Imaging.Net.Core](https://www.nuget.org/packages/Syncfusion.Pdf.Imaging.Net.Core) package as a reference to your project from [NuGet.org](https://www.nuget.org/).
Step 2: **Install the NuGet package**: Add the [Syncfusion.Pdf.Imaging.Net.Core](https://www.nuget.org/packages/Syncfusion.Pdf.Imaging.Net.Core) package as a reference to your project from [NuGet.org](https://www.nuget.org/).

3. **Include necessary namespaces**: Add the following namespace in your `Program.cs` file:
Step 3: **Include necessary namespaces**: Add the following namespace in your `Program.cs` file:

```csharp
using Syncfusion.Pdf;
```

4. **Convert image to PDF**: Implement the following code in `Program.cs` to convert an image into a PDF file:
Step 4: **Convert image to PDF**: Implement the following code in `Program.cs` to convert an image into a PDF file:

```csharp
// Create an instance of the ImageToPdfConverter class
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ The Syncfusion [.NET Core PDF library](https://www.syncfusion.com/document-proce

Follow these steps to merge PDF files using the Syncfusion library:

1. **Create a new project**: Start by creating a new C# Console Application project.
Step 1: **Create a new project**: Start by creating a new C# Console Application project.

2. **Install the NuGet package**: Reference the [Syncfusion.Pdf.Net.Core](https://www.nuget.org/packages/Syncfusion.Pdf.Net.Core/) package in your project from [NuGet.org](https://www.nuget.org/).
Step 2: **Install the NuGet package**: Reference the [Syncfusion.Pdf.Net.Core](https://www.nuget.org/packages/Syncfusion.Pdf.Net.Core/) package in your project from [NuGet.org](https://www.nuget.org/).

3. **Include required namespaces**: Add the following namespace in your `Program.cs` file:
Step 3: **Include required namespaces**: Add the following namespace in your `Program.cs` file:

```csharp
using Syncfusion.Pdf;
```

4. **Merge PDF files**: Use the following code snippet in `Program.cs` to merge PDF files:
Step 4: **Merge PDF files**: Use the following code snippet in `Program.cs` to merge PDF files:

```csharp
// Create a PDF document for the final merged output
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ The Syncfusion [.NET Core PDF library](https://www.syncfusion.com/document-proce

Follow these steps to apply OCR to PDF files using the Syncfusion library:

1. **Create a new project**: Set up a new C# Console Application project.
Step 1: **Create a new project**: Set up a new C# Console Application project.

2. **Install the NuGet package**: Add the [Syncfusion.PDF.OCR.Net.Core](https://www.nuget.org/packages/Syncfusion.PDF.OCR.Net.Core) package as a reference in your project from [NuGet.org](https://www.nuget.org/).
Step 2: **Install the NuGet package**: Add the [Syncfusion.PDF.OCR.Net.Core](https://www.nuget.org/packages/Syncfusion.PDF.OCR.Net.Core) package as a reference in your project from [NuGet.org](https://www.nuget.org/).

3. **Include necessary namespaces**: Add the following namespaces in your `Program.cs` file:
Step 3: **Include necessary namespaces**: Add the following namespaces in your `Program.cs` file:

```csharp
using Syncfusion.OCRProcessor;
using Syncfusion.Pdf.Parsing;
```

4. **Implement OCR Processing**: Use the following code snippet in `Program.cs` to perform OCR on a PDF document:
Step 4: **Implement OCR Processing**: Use the following code snippet in `Program.cs` to perform OCR on a PDF document:

```csharp
// Initialize the OCR processor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,5 @@ void LoadedDocument_SubstituteFont(object sender, PdfFontEventArgs args)
}

//Close the document.
docStream.Dispose();
loadedDocument.Close(true);
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ The Syncfusion [.NET Core PDF library](https://www.syncfusion.com/document-proce

Follow these steps to convert a PDF document to PDF/A format using the Syncfusion library:

1. **Create a new project**: Start by creating a new C# Console Application project.
Step 1: **Create a new project**: Start by creating a new C# Console Application project.

2. **Install the NuGet package**: Reference the [Syncfusion.Pdf.Net.Core](https://www.nuget.org/packages/Syncfusion.Pdf.Net.Core/) package in your project from [NuGet.org](https://www.nuget.org/).
Step 2: **Install the NuGet package**: Reference the [Syncfusion.Pdf.Net.Core](https://www.nuget.org/packages/Syncfusion.Pdf.Net.Core/) package in your project from [NuGet.org](https://www.nuget.org/).

3. **Include necessary namespaces**: Add the following namespaces in your `Program.cs` file:
Step 3: **Include necessary namespaces**: Add the following namespaces in your `Program.cs` file:

```csharp
using Syncfusion.Pdf;
using Syncfusion.Pdf.Parsing;
```

4. **Convert PDF to PDF/A**: Implement the following code in `Program.cs` to perform the conversion:
Step 4: **Convert PDF to PDF/A**: Implement the following code in `Program.cs` to perform the conversion:

```csharp
// Load an existing PDF document
Expand All @@ -41,6 +41,6 @@ Follow these steps to convert a PDF document to PDF/A format using the Syncfusio
}
```

You can download a complete working sample from the [GitHub repository](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/PDF%20Conformance/Get-PDF-to-PDFA-conversion-progress/.NET).
You can download a complete working sample from the [GitHub repository](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/PDF%20Conformance/Convert-PDF-to-PDFA-conformance-document).

To explore additional features of the Syncfusion PDF library, click [here](https://www.syncfusion.com/document-processing/pdf-framework/net-core).
Original file line number Diff line number Diff line change
Expand Up @@ -4,46 +4,46 @@ The Syncfusion [.NET Core PDF library](https://www.syncfusion.com/document-proce

## Steps to split PDF files

1. **Create a new project**: Begin by setting up a new C# Console Application project.
Step 1: **Create a new project**: Begin by setting up a new C# Console Application project.

2. **Install the NuGet package**: Add the [Syncfusion.Pdf.Net.Core](https://www.nuget.org/packages/Syncfusion.Pdf.Net.Core/) package to your project from [NuGet.org](https://www.nuget.org/).
Step 2: **Install the NuGet package**: Add the [Syncfusion.Pdf.Net.Core](https://www.nuget.org/packages/Syncfusion.Pdf.Net.Core/) package to your project from [NuGet.org](https://www.nuget.org/).

3. **Include necessary namespaces**: In your **Program.cs** file, include the following namespaces:
Step 3: **Include necessary namespaces**: In your **Program.cs** file, include the following namespaces:

```csharp
using Syncfusion.Pdf.Parsing;
using Syncfusion.Pdf;
```

4. **Split the PDF file:** Implement the following code in **Program.cs** to split the PDF file:

```csharp
// Create a FileStream object to read the input PDF file
using (FileStream inputFileStream = new FileStream("Input.pdf", FileMode.Open, FileAccess.Read))
{
// Load the PDF document from the input stream
using (PdfLoadedDocument loadedDocument = new PdfLoadedDocument(inputFileStream))
{
// Iterate over each page of the loaded document
for (int pageIndex = 0; pageIndex < loadedDocument.PageCount; pageIndex++)
{
```

Step 4: **Split the PDF file:** Implement the following code in **Program.cs** to split the PDF file:

```csharp
// Create a FileStream object to read the input PDF file
using (FileStream inputFileStream = new FileStream("Input.pdf", FileMode.Open, FileAccess.Read))
{
// Load the PDF document from the input stream
using (PdfLoadedDocument loadedDocument = new PdfLoadedDocument(inputFileStream))
{
// Iterate over each page of the loaded document
for (int pageIndex = 0; pageIndex < loadedDocument.PageCount; pageIndex++)
{
// Create a new PdfDocument for the output
using (PdfDocument outputDocument = new PdfDocument())
{
// Import the page into the new document
outputDocument.ImportPage(loadedDocument, pageIndex);

// Create a FileStream to write the output PDF file
using (FileStream outputFileStream = new FileStream($"Output{pageIndex}.pdf", FileMode.Create, FileAccess.Write))
{
// Save the new document to the output stream
outputDocument.Save(outputFileStream);
}
// Import the page into the new document
outputDocument.ImportPage(loadedDocument, pageIndex);

// Create a FileStream to write the output PDF file
using (FileStream outputFileStream = new FileStream($"Output{pageIndex}.pdf", FileMode.Create, FileAccess.Write))
{
// Save the new document to the output stream
outputDocument.Save(outputFileStream);
}
}
}
}
}
```
}
}
}
```

You can download a complete working sample from [GitHub repository](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/Pages/Splitting-PDF-file-into-individual-pages/).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ The Syncfusion [.NET Core PDF library](https://www.syncfusion.com/document-proce

## Steps to Redact PDF Files

1. **Create a new project**: Start by creating a new C# Console Application project.
Step 1: **Create a new project**: Start by creating a new C# Console Application project.

2. **Install the NuGet package**: Add the [Syncfusion.Pdf.Net.Core](https://www.nuget.org/packages/Syncfusion.Pdf.Net.Core/) package to your project via [NuGet.org](https://www.nuget.org/).
Step 2: **Install the NuGet package**: Add the [Syncfusion.Pdf.Net.Core](https://www.nuget.org/packages/Syncfusion.Pdf.Net.Core/) package to your project via [NuGet.org](https://www.nuget.org/).

3. **Include necessary namespaces**: Add these namespaces to your **Program.cs** file:
Step 3: **Include necessary namespaces**: Add these namespaces to your **Program.cs** file:

```csharp
using Syncfusion.Pdf.Parsing;
Expand All @@ -17,7 +17,7 @@ The Syncfusion [.NET Core PDF library](https://www.syncfusion.com/document-proce
using Syncfusion.Drawing;
```

4. **Implement redaction**: Use the following code in **Program.cs** to perform PDF redaction:
Step 4: **Implement redaction**: Use the following code in **Program.cs** to perform PDF redaction:

```csharp
using (FileStream docStream = new FileStream(@"Input.pdf", FileMode.Open, FileAccess.Read))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ The Syncfusion [.NET Core PDF library](https://www.syncfusion.com/document-proce

## Steps to Protect PDF Files

1. **Create a new project**: Begin by setting up a new C# Console Application project.
Step 1: **Create a new project**: Begin by setting up a new C# Console Application project.

2. **Install the NuGet package**: Add the [Syncfusion.Pdf.Net.Core](https://www.nuget.org/packages/Syncfusion.Pdf.Net.Core/) package to your project from [NuGet.org](https://www.nuget.org/).
Step 2: **Install the NuGet package**: Add the [Syncfusion.Pdf.Net.Core](https://www.nuget.org/packages/Syncfusion.Pdf.Net.Core/) package to your project from [NuGet.org](https://www.nuget.org/).

3. **Include necessary namespaces**: Add these namespaces in your **Program.cs** file:
Step 3: **Include necessary namespaces**: Add these namespaces in your **Program.cs** file:

```csharp
using Syncfusion.Pdf.Security;
using Syncfusion.Pdf.Parsing;
```

4. **Implement encryption**: Use the following code in **Program.cs** to secure your PDF file:
Step 4: **Implement encryption**: Use the following code in **Program.cs** to secure your PDF file:

```csharp
// Load the PDF document from a file stream
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ The Syncfusion [.NET Core PDF library](https://www.syncfusion.com/document-proce

## Steps to Add a Table to a PDF Document

1. **Create a new project**: Start by setting up a new C# Console Application project.
Step 1: **Create a new project**: Start by setting up a new C# Console Application project.

2. **Install the NuGet package**: Reference the [Syncfusion.Pdf.Net.Core](https://www.nuget.org/packages/Syncfusion.Pdf.Net.Core/) package in your project from [NuGet.org](https://www.nuget.org/).
Step 2: **Install the NuGet package**: Reference the [Syncfusion.Pdf.Net.Core](https://www.nuget.org/packages/Syncfusion.Pdf.Net.Core/) package in your project from [NuGet.org](https://www.nuget.org/).

3. **Include necessary namespaces**: Add these namespaces to your **Program.cs** file:
Step 3: **Include necessary namespaces**: Add these namespaces to your **Program.cs** file:

```csharp
using Syncfusion.Pdf.Grid;
using Syncfusion.Pdf;
using Syncfusion.Drawing;
```

4. **Add a table to the PDF**: Use the following code in **Program.cs** to insert a table into the PDF:
Step 4: **Add a table to the PDF**: Use the following code in **Program.cs** to insert a table into the PDF:

```csharp
// Create a new PDF document
Expand Down
Loading

0 comments on commit 86f86cc

Please sign in to comment.