Questions tagged [gembox-pdf]

GemBox.Pdf is a .NET component that enables developers to read, write, update, convert, print, clone, merge, split, encrypt, and digitally sign PDF files from their .NET applications.

GemBox.Pdf () is a .NET component that enables developers to read, write, update, convert, print, clone, merge, split, encrypt, and digitally sign PDF files from their .NET applications.

GemBox.Pdf Free is free of charge while GemBox.Pdf Professional is a commercial version licensed per developer. Server deployment is royalty-free.


Hello World

C#

// Create a new document.
using (PdfDocument document = new PdfDocument())
{
    // Add a page.
    var page = document.Pages.Add();

    // Write a text.
    using (var formattedText = new PdfFormattedText())
    {
        formattedText.Append("Hello World!");
        page.Content.DrawText(formattedText, new PdfPoint(100, 700));
    }

    // Save as PDF file.
    document.Save("Output.pdf");
}

VB.NET

' Create a new document.
Using document As New PdfDocument()

    ' Add a page.
    Dim page = document.Pages.Add()

    ' Write a text.
    Using formattedText = New PdfFormattedText()
        formattedText.Append("Hello World!")
        page.Content.DrawText(formattedText, New PdfPoint(100, 700))
    End Using

    ' Save as PDF file.
    document.Save("Output.pdf")

End Using

Top Features


System Requirement

  • .NET Framework 3.5 - 4.8
  • .NET Core 3.1 (.NET 5 for Windows)
  • .NET Standard 2.0 (.NET 5 for Linux, macOS, Android, iOS, …)

Installation

You can download GemBox.Pdf from BugFixes

Or from NuGet


Resources


Related Tags

10 questions
2
votes
0 answers

How to change a size of a page in PDF GemBox

I'm trying to create a PDF from the scratch using GemBoxPdf using (var document = new PdfDocument()) { // Add a page. var page = document.Pages.Add(); page.Rotate = 90; // Write a text. …
2
votes
2 answers

When printing a pdf with Gembox.Pdf in C# the documentName in the print queue is always 'XPS Document'

I am trying to print a pdf document using Gembox.Pdf in C# (.NET Framework 4.8). This is the code I use: public void PrintPdf(string fileToPrint, string printerName, string jobName) { ComponentInfo.SetLicense("FREE-LIMITED-KEY"); …
Tijl .Reynhout
  • 901
  • 2
  • 9
  • 24
2
votes
1 answer

Split PDF by chapters from Table Of Contents

I'm using GemBox.Pdf and I need to extract individual chapters in a PDF file as a separate PDF files. The first page (maybe the second page as well) contains TOC (Table Of Contents) and I need to split the rest of the PDF pages based on it: Also,…
hertzogth
  • 236
  • 1
  • 2
  • 19
1
vote
4 answers

How to keep the MemoryStream from being closed automatically

I have a memory stream in a function like so using var document = new PdfDocument(); var memoryStream = new MemoryStream(); document.Save(memoryStream, new GemBox.Pdf.PdfSaveOptions()); memoryStream.Seek(0, SeekOrigin.Begin); return…
qkhanhpro
  • 4,371
  • 2
  • 33
  • 45
1
vote
1 answer

Merge PDF files with TOC element

I'm merging PDF files using GemBox.Pdf as shown here. This works great and I can easily add outlines. I've previously done a similar thing and merged Word files with GemBox.Document as shown here. But now my problem is that there is no TOC element…
hertzogth
  • 236
  • 1
  • 2
  • 19
0
votes
0 answers

ArgumentOutOfRangeException when trying to use GemBox.Pdf PdfDocument.Load

Using Gembox.Pdf 17.01386 free-license. I’m receiving a PDF file in base64 format, then I convert the string using Convert.FromBase64String to turn into a byte array. Then I turn it into a new MemoryStream, and the I try to call…
Drock
  • 9
  • 3
0
votes
0 answers

Using Gembox to print a pdf file as a label prints label with undesired margin

The pdf file printed is exposed on a label with a left margin. When printing the pdf via Acrobat the label has no left margin and is printed correctly. How can I fix the page layout is exactly executed as also done by Acrobat itself? Result with…
0
votes
1 answer

Get bounds of glyphs in PDF with GemBox

Goal: extract a value from a specific location inside a PDF page. In GemBox.Pdf, I can extract text elements including their bounds and content, but: Problem: a text element can have a complex structure, with each glyph being positioned using…
marsze
  • 15,079
  • 5
  • 45
  • 61
0
votes
1 answer

GemBox C# - position qr code in top right corner

I am creating a PDF-file with GemBox in my .net project and I am wondering how to position the qr code in the top right corner. With the code below, I am replacing variables in my word file and with the addition of the qr code section, the qr code…
user11718626
0
votes
1 answer

How can I add an embedded timestamp to an existing digital signature that was issued by a TSP

I am trying to achieve PAdES digital signature with an embedded timestamp for a .pdf document. Namely, what I'm trying to achieve: DDS with an embedded timestamp I'm using a trusted provider (TSP; external party) that performs the DDS and therefore…
Omarsson
  • 3
  • 1
  • 2