Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
Aspose.PDF for .NET APIを使用すると、C#およびVB.NETを使用してPDFファイルを作成および読み取ることができます。このAPIは、WinForms、ASP.NETなどのさまざまな.NETアプリケーションで使用できます。この記事では、Aspose.PDF for .NET APIを使用して.NETアプリケーションでPDFファイルを簡単に生成および読み取る方法を示します。
C#を使用してPDFファイルを作成するには、次の手順を使用できます。
次のコードスニペットは、Aspose.Drawingライブラリでも動作します。
// For complete examples and data files, visit https://github.com/aspose-pdf/Aspose.PDF-for-.NET
private static void HelloWorld()
{
// The path to the documents directory
var dataDir = RunExamples.GetDataDir_AsposePdf_QuickStart();
// Create PDF document
using (var document = new Aspose.Pdf.Document())
{
// Add page
var page = document.Pages.Add();
// Add text to new page
page.Paragraphs.Add(new Aspose.Pdf.Text.TextFragment("Hello World!"));
// Save PDF document
document.Save(dataDir + "HelloWorld_out.pdf");
}
}
この場合、A4ページサイズ、縦向きの1ページのPDFドキュメントを作成します。ページの左上部分には「Hello, World」が含まれます。
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.