zl程序教程

您现在的位置是:首页 >  其他

当前栏目

2022||| Docotic.Pdf Crack--最新版

PDF -- 2022 Crack 最新版
2023-09-14 09:13:44 时间

PDF library for C# and VB.NET

Docotic.Pdf is a high-performance C# PDF library for .NET. You can use it to create, read, and edit PDF documents in .NET Core, ASP.NET, Windows Forms, WPF, Xamarin, Blazor, Unity, and HoloLense applications.

 

The library supports .NET 6, .NET 5, .NET Standard / .NET Core, and .NET 4.x frameworks. You can use the library in .NET on Windows, Linux, macOS, Android, iOS, or in a cloud environment.

Docotic.Pdf provides an easy-to-use API. There is a large set of C# and VB.NET samples to help you integrate the SDK in your project quickly. Contact us to get a comprehensive answer within a few hours. You'll get the answer directly from developers.

Since the first release in 2010, we constantly improve quality of Docotic.Pdf and increase its feature set. The library is fast and its memory consumption is low even for large PDF documents. Our C# code is 100% managed without unsafe blocks, and has no external dependencies. To prevent regressions, we check each build of our PDF SDK with thousands of automatic tests. This allows us to provide you with production-quality builds as soon as the new build with fixes and improvements is ready.

Extract text from PDF document in C#

Use Docotic.Pdf library to convert PDF documents to text in .NET. You can extract formatted text to parse structured data like tables.

You can also read PDF text with detailed information (position, font, color) about every text chunk. That allows you to search text in PDF documents and highlight found phrases.

Docotic.Pdf supports right-to-left and bidirectional text. You can use it to extract Arabic, Hebrew, and Persian text from PDF documents in .NET.

using BitMiracle.Docotic.Pdf;

using (var pdf = new PdfDocument("your_document.pdf"))
{
    var options = new PdfTextExtractionOptions
    {
        SkipInvisibleText = true,
        WithFormatting = true
    };
    string formattedText = pdf.GetText(options);
    Console.WriteLine(formattedText);
}

Edit PDF documents in C#

Docotic.Pdf is a powerful .NET PDF editor. You can compress PDF documents. It is possible to remove content. For example, potentially insecure content like actions, attachments, controls.

You can also edit page objects - replace images, change colors, remove or replace text in PDF.

Docotic.Pdf SDK allows you to split and merge PDF documents in just a few lines of code. And you can remove or reorder pages. With help of the library it's possible to impose PDF pages.

using (var merged = new PdfDocument("first.pdf"))
{
    merged.Append("second.pdf");
    merged.ReplaceDuplicateObjects();
    merged.Save("merged.pdf");
    
    // copy third and first pages to a new PDF document
    using (PdfDocument splitted = pdf.CopyPages(new[] { 2, 0 }))
    {
        splitted.RemoveUnusedResources();
        splitted.Save("splitted.pdf");
    }
}

Convert PDF to images in C#

Our .NET PDF library allows you to save PDF pages as images. You can convert PDF pages to full size or thumbnail images in PNG, TIFF, and JPEG formats.

Or you can save PDF documents as multipage TIFF files. The library can produce bitonal and grayscale TIFF images.

It is also possible to print PDF documents in C# and VB.NET using Docotic.Pdf.

When needed, you can extract images from PDF documents.

using (var pdf = new PdfDocument(@"your_document.pdf"))
{
    PdfDrawOptions options = PdfDrawOptions.Create();
    options.BackgroundColor = new PdfRgbColor(255, 255, 255);
    options.HorizontalResolution = 300;
    options.VerticalResolution = 300;

    // save one page
    pdf.Pages[0].Save("page0.png", options);

    // save the whole document as multipage bitonal TIFF
    options.Compression = ImageCompressionOptions.CreateBitonalTiff();
    pdf.SaveAsTiff("your_document.tiff", options);
}

Convert HTML to PDF in C#

Generate PDF from HTML using the free HTML to PDF add-on for Docotic.Pdf library.

The add-on uses Chromium during conversion, so the web standards compliance is great. You can produce PDF documents from the most complex HTML documents with scripts and styles.

For produced PDFs, it is possible to set up page size, margins, and orientation. The conversion can be delayed if needed. It is possible to convert password-protected HTML documents and documents with SSL errors.

using (var converter = await HtmlConverter.CreateAsync())
{
    var options = new HtmlConversionOptions();

    options.Page.SetSize(PdfPaperSize.A5, isLandscape: true);
    options.Page.MarginTop = 50;
    options.Page.MarginBottom = 50;

    options.Start.SetStartAfterDelay(10 * 1000);

    options.Authentication.SetCredentials("name", "password");

    options.CustomUserAgent = "A user agent of your app";

    using (var pdf = await converter.CreatePdfAsync(url, options))
        pdf.Save("output.pdf");
}

Fill PDF forms in C#

Docotic.Pdf provides friendly API to read, edit, and fill PDF forms in .NET applications.

You can also flatten PDF form fields.

And you can annotate PDF documents using our C# PDF library.

Related group of samples

using (var pdf = new PdfDocument("form.pdf"))
{
    PdfControl field = pdf.GetControl("app_types");
    if (field?.Type == PdfWidgetType.TextBox)
    {
        PdfTextBox tb = (PdfTextBox)field;
        tb.Text = "WinForms, WPF, ASP.NET Core, Blazor, Xamarin";
        
        field.Flatten();
    }

    pdf.Save("result.pdf");
}

Create PDF documents in C#

Use Docotic.Pdf to generate PDF documents in .NET Framework and .NET Core applications.

Add textimages, and vector graphics to your PDF files. You can also convert images to PDF documents.

Create interactive PDF documents with formsannotationsbookmarks, and layers.

You can also sign PDF documents in C# and protect generated PDF files.

using (var pdf = new PdfDocument())
{
    PdfPage page = pdf.Pages[0];

    PdfCanvas canvas = page.Canvas;
    canvas.Font = pdf.AddFont(PdfBuiltInFont.TimesRoman);
    canvas.FontSize = 14;
    canvas.DrawString(10, 60, "Type:");

    PdfTextBox type = page.AddTextBox("type", 55, 60, 90, 20);
    type.Text = "C# PDF library";

    PdfImage image = pdf.AddImage("csharp.jpg");
    canvas.DrawImage(image, 10, 80);

    pdf.Save(pathToFile);
}