Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
Aspose.PDF for .NET is a robust .NET component that lets developers create PDF documents from scratch without using Adobe Acrobat. It provides a simple Application Programming Interface (API) that is easy to learn and use.
Aspose.PDF for .NET is implemented using Managed C# and it can be used with any .NET language like C#, VB.NET and J# etc. It can be integrated with any kind of application either it’s an ASP.NET Web Application or a Windows Application.
So that the developers can get up and running quickly, Aspose.PDF for .NET provides fully featured demos and working examples written in C#. Using these demos, developers can quickly learn about the features provided by Aspose.PDF for .NET.
The fast, light-weight component creates PDF documents efficiently and helps your application perform better. Aspose.PDF for .NET is our customers’ first choice when creating PDF documents because of its price, superb performance and great support.
Aspose.PDF for .NET is multithread safe as long as only one thread works on a document at a time. It is a typical scenario to have one thread working on one document. Different threads can safely work on different documents at the same time.
All Aspose .NET components require Full Trust permission set. The reason is, Aspose .NET components need to access registry settings, system files other than virtual directory for certain operations like parsing fonts etc. Moreover, Aspose .NET Components are based on core .NET system classes that also require Full Trust permission set in many cases.
Internet Service Providers hosting multiple applications from different companies mostly enforce Medium Trust security level. In case of .NET 2.0, such security level applies the following constraints:
<trust>
element.You can easily download Aspose.PDF for .NET for evaluation. The evaluation download is the same as the purchased download. The evaluation version simply becomes licensed when you add a few lines of code to apply the license.
The evaluation version of Aspose.PDF (without a license specified) provides full product functionality. Still, it has two limitations: it inserts an evaluation watermark, and only the first four pages of any document can be viewed/edited.
NuGet is a free, open source developer-focused package management system for the .NET platform intent on simplifying the process of incorporating third party libraries into a .NET application during development. It is a Visual Studio extension that makes it easy to add, remove, and update libraries and tools in Visual Studio projects that use the .NET Framework. A library or tool can easily be shared with other developers by creating a NuGet package and storing it inside a NuGet repository. When you install the package, NuGet copies files to your solution and automatically makes the necessary changes, such as adding references and changing your app.config or web.config files. If you decide to remove the library, NuGet removes files and reverses whatever changes it made to your project so that no clutter is left.
Install-Package Aspose.PDF
to install the latest full release, or type the command Install-Package Aspose.PDF -prerelease
to install the latest release including hot fixes.Enter
.If you have already referenced the component through NuGet, follow these steps to update the reference to the latest version:
Update-Package Aspose.PDF
to reference the latest full release, or type the command Update-Package Aspose.PDF -prerelease
to install latest release including hot fixes.Follow these steps to reference the component using the package manager GUI:
Open you .NET application in Visual Studio.
From the Project menu select Manage NuGet Packages.
Type Aspose.PDF into the search box to find Aspose.PDF for .NET.
Click Install/Update next to the latest version of Aspose.PDF for .NET.
As Aspose.PDF for .NET provides .NET Standard 2.0 (.NET Core 2.0) support, so it can be used in Core Applications running in Linux like operating systems. We are constantly working over improving the .NET Core support in our API. However, there are some following operations which we recommend our customers to perform, in order to get better results while using features of Aspose.PDF for .NET:
Please install:
sudo apt-get install ttf-mscorefonts-installer
)
These fonts should be placed in “/usr/share/fonts/truetype/msttcorefonts” directory as Aspose.PDF for .NET scans this folder on Linux like operating systems. In case operating system has other default folder/directory for fonts, you should use following line of code before performing any operation using Aspose.PDF.Aspose.Pdf.Text.FontRepository.Sources.Add(new FolderFontSource("<user's path to ms fonts>"));
dotnet --version
# Create a new console application
dotnet new console -n AsposePDFNetDemo
# Navigate into the project directory
cd AsposePDFNetDemo
# Install Aspose.PDF package
dotnet add package Aspose.PDF
.csproj
file<ItemGroup>
<PackageReference Include="Aspose.PDF" Version="x.x.x" />
</ItemGroup>
.vscode/launch.json
:{
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceFolder}/bin/Debug/net7.0/AsposePDFNetDemo.dll",
"args": [],
"cwd": "${workspaceFolder}",
"console": "internalConsole",
"stopAtEntry": false
}
]
}
Replace the contents of Program.cs
with:
// For complete examples and data files, visit https://github.com/aspose-pdf/Aspose.PDF-for-.NET
using System;
using Aspose.Pdf;
using Aspose.Pdf.Text;
class Program
{
static void Main(string[] args)
{
// Activate your license, you can comment out these codelines to use library in Evaluation mode
var license = new Aspose.Pdf.License();
license.SetLicense("Aspose.PDF.NET.lic");
// Create PDF document
using (var document = new Aspose.Pdf.Document())
{
// Add page
var page = document.Pages.Add();
// Create a text fragment
var textFragment = new Aspose.Pdf.Text.TextFragment("Hello, Aspose.PDF for .NET!");
textFragment.Position = new Aspose.Pdf.Text.Position(100, 600);
// Add text to the page
page.Paragraphs.Add(textFragment);
// Save PDF document
document.Save("sample.pdf");
}
}
}
dotnet restore
dotnet build
dotnet run
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.