YGAddImgNTextToPDF 1.0.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package YGAddImgNTextToPDF --version 1.0.0
NuGet\Install-Package YGAddImgNTextToPDF -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="YGAddImgNTextToPDF" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="YGAddImgNTextToPDF" Version="1.0.0" />
<PackageReference Include="YGAddImgNTextToPDF" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add YGAddImgNTextToPDF --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: YGAddImgNTextToPDF, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package YGAddImgNTextToPDF@1.0.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=YGAddImgNTextToPDF&version=1.0.0
#tool nuget:?package=YGAddImgNTextToPDF&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
YGAddImgNTextToPdf
A simple class to add images and texts to existing PDF document
Installation
Include this package in the project file
Usage
string sourcePdfPath = @"c:\temp\Contract.pdf"; // Path to the existing PDF
string destPdfPath = @"c:\temp\Contract_Signed.pdf"; // Path to save the new PDF
string signatureImagePath = @"c:\temp\signature.jpg"; // Path to the signature image
string name = @"c:\temp\name.png";
string date = @"c:\temp\date.png";
// This is to add images and texts to sourcePdfPath, and produce the resulting pdf in destPdfPath.
// The images and texts are added in page 2
using (PDFSign pdf = new PDFSign(sourcePdfPath, destPdfPath))
{
pdf.AddImage(2, signatureImagePath, 3, 50, 340);
pdf.AddImage(2, name, 72, 168, 359);
pdf.AddImage(2, date, 72, 400, 363);
pdf.AddText(2, "(888) 555 - 1212", 500, 365, new XFont("Verdana", 8, XFontStyle.Regular), XBrushes.Red);
pdf.WriteOutPDF();
}
Examples
Test project is provided in the solution to illustrate how instantiate and invoke the pdf functionality
Output:
The output is a modified pdf with the images and texts added to it
Dependencies
PdfSharpCore
Contributing
Any new ideas on how to enhance this class without adding much complexity, please adhere to SOLID principle
License
This project is licensed under the MIT License(LICENSE).
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- PdfSharpCore (>= 1.3.63)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
2.6.0 | 193 | 3/11/2025 |
2.5.1 | 119 | 2/26/2025 |
2.5.0 | 121 | 2/26/2025 |
2.4.0 | 133 | 1/3/2025 |
2.3.0 | 123 | 1/2/2025 |
2.2.0 | 122 | 11/6/2024 |
2.1.0 | 137 | 9/2/2024 |
2.0.3 | 137 | 7/23/2024 |
2.0.2 | 125 | 7/23/2024 |
2.0.1 | 129 | 7/23/2024 |
2.0.0 | 132 | 7/23/2024 |
1.1.2 | 134 | 6/28/2024 |
1.1.1 | 132 | 5/31/2024 |
1.1.0 | 135 | 5/30/2024 |
1.0.0 | 141 | 5/23/2024 |
initial release