sgcPDF Feature Matrix
Everything sgcPDF does, grouped by task. Every feature is implemented in Object Pascal in the sgcPDF_*.pas units and ships with full source code. The code samples on this page were compiled against the sgcPDF sources and run.
Everything sgcPDF does, grouped by task. Every feature is implemented in Object Pascal in the sgcPDF_*.pas units and ships with full source code. The code samples on this page were compiled against the sgcPDF sources and run.
14 features
7 features
11 features
5 features
4 features
8 features
7 features
7 features
5 NuGet packages
| Feature | Details |
|---|---|
| Pages | Any page size and orientation, A4, Letter or custom, and page rotation. |
| Text | The 14 standard PDF fonts and colored text, with paragraph wrapping through the canvas and HTML renderers. |
| Embedded fonts | TrueType, OpenType (TrueType and CFF outlines) and TrueType collections, embedded and subset automatically, with Unicode ToUnicode maps so the text can be copied and searched. |
| Complex scripts | Kerning and ligatures, Arabic joining forms through GSUB, and the Unicode bidirectional algorithm for right to left text. |
| CJK text | Chinese, Japanese and Korean text through embedded TrueType and TrueType collection fonts. |
| Images | JPEG, PNG with alpha, BMP and TIFF (including CCITT fax images), with soft masks. |
| Vector graphics | Lines, rectangles, circles, ellipses, Bezier curves, polygons, dash patterns, line caps and joins, transparency and gradients. |
| Tables | Tables with headers, borders, cell padding and colors that continue across pages. |
| Barcodes | Code 128, Code 39, EAN-13, EAN-8, UPC-A, ITF, Codabar, GS1-128, QR Code, DataMatrix (ECC200) and PDF417, drawn as vectors. The TsgcPDFBarcodeControl (VCL) and TsgcPDFBarcodeFMX (FireMonkey) controls, and in .NET TsgcPDFBarcodeControl (WinForms), TsgcWpfPDFBarcodeControl and TsgcAvaloniaPDFBarcodeControl, show them on forms, save them to PNG or SVG and draw them on a PDF page through Symbol.DrawToPDF. The WPF and Avalonia controls draw the modules as vector geometry on whole device pixels, and every property is a dependency or styled property, so the text binds in XAML. All of them are in every sgcPDF edition. |
| Annotations and links | Sticky notes, free text, highlight, underline and strike-out, lines and arrows, squares and circles, freehand ink and stamps, plus links to URLs and to pages. Appearance streams are generated, so the annotations display in Adobe Acrobat, browsers and other viewers. |
| Comment replies | Replies attached to any annotation build a threaded discussion, each reply with its own author, date and contents. |
| Bookmarks and layers | Nested bookmarks (outline) and optional content groups (layers) that readers can show or hide. |
| HTML to PDF | TsgcPDFHTMLRenderer: headings, paragraphs, inline CSS styles, lists, tables, images, links, page breaks, headers, footers and page numbers. |
| Canvas and EMF to PDF | TsgcPDFCanvas records drawing calls into PDF content, and EMF metafiles are played back into PDF vectors, so existing report and chart code produces PDF output. |
procedure HTMLToPDF(const APDFFile: string);
var
oHTML: TsgcPDFHTMLRenderer;
begin
oHTML := TsgcPDFHTMLRenderer.Create(nil);
try
oHTML.PageWidth := 595;
oHTML.PageHeight := 842;
oHTML.FooterText := 'Page {page} of {pages}';
oHTML.HTMLToPDFFile(
'<html><head><style>h1 { color: #003366 }</style></head><body>' +
'<h1>Invoice 2026-001</h1>' +
'<table><tr><th>Item</th><th>Amount</th></tr>' +
'<tr><td>Consulting</td><td>299.00</td></tr></table>' +
'</body></html>', APDFFile);
finally
oHTML.Free;
end;
end;
| Feature | Details |
|---|---|
| Watermarks and stamps | Text watermarks with font, size, rotation, color and opacity, on one page or on all pages. |
| Headers, footers, page numbers | Header and footer text and page numbers with a format such as Page %d of %d. |
| Page operations | Merge documents, split, extract page ranges, insert, delete, rotate and reorder pages. |
| Incremental save | Changes are appended to the original file as a new revision, which keeps earlier digital signatures valid. |
| Existing annotations | The annotations of an existing PDF load as typed objects with author, date, replies and geometry. Edit them in code or in the viewer and save, or call SaveIncremental to append the changes without touching the original bytes, so existing signatures remain intact. |
| Compact output | Object streams and cross reference streams for smaller files, plus TsgcPDFOptimizer to remove duplicates and unused objects and to downsample images. |
| Large files | Offsets are 64 bit end to end and objects are loaded on demand from a stream, so files over 2 GB can be opened and saved. |
| Feature | Details |
|---|---|
| VCL viewer | TsgcPDFViewerControl with scrolling, zoom modes, page navigation, text selection and copy, search with highlight, form field filling, link navigation and printing, plus TsgcPDFThumbnailView and TsgcPDFOutlineView. |
| FireMonkey viewer | TsgcPDFViewerFMX draws through the FMX canvas on Windows, macOS, iOS and Android. Marquee zoom (SelectionMode psmZoom, OnMarqueeZoom) zooms to a rectangle dragged with the mouse or with a long press and drag. Text search: FindText finds and highlights every match and scrolls to the first one, FindNext and FindPrevious move between the matches, and OnSearchProgress reports each page and can stop a long search. SearchColor and SearchCurrentColor set the highlight colors. View modes: ViewMode selects single page (fvmSinglePage, flips pages with the mouse wheel and Page Up and Page Down), continuous (fvmContinuous, the default) or two page (fvmTwoPage, side by side, right to left aware). |
| .NET viewers | TsgcPDFViewerControl for WinForms, TsgcWpfPDFViewer for WPF and TsgcAvaloniaPDFViewer for Avalonia, each with thumbnail and outline views. The WPF and Avalonia viewers have zoom modes, Ctrl+wheel and marquee zoom (pinch on Avalonia), text selection and copy, search with highlights, links and outline navigation, page boxes and the measure tool. Like the WinForms viewer, they edit annotations and fill forms. |
| Interactive annotations | In Delphi VCL and FMX, C++Builder, and .NET WinForms, WPF and Avalonia, end users create annotations with the mouse: sticky notes, free text, highlight, underline and strike-out over text, lines and arrows, rectangles and ellipses, freehand ink and stamps. They select, move, resize, edit and delete them. Clicking a note opens a popup with the author, date, contents and replies, where they can edit and reply. The viewers raise OnAnnotationClick, OnAnnotationAdd, OnAnnotationChange, OnAnnotationDelete and OnAnnotationSelect. In the WPF and Avalonia viewers, AnnotationEditing turns the editing on and AnnotationTool picks the tool. |
| Viewer theme (with sgcUI) | With UseUITheme the VCL, FireMonkey, WinForms, WPF and Avalonia viewers, and the thumbnail, outline and comments views, take their colours from the sgcUI application theme: the area around the pages, the pop ups, the selection and dark scroll bars under a dark theme, repainted when the theme, the preset or the accent changes. The pages and the annotation colours do not change. It needs the sgcUIPDF_Theme unit in Delphi and C++Builder, or the esegece.sgcUICore.sgcPDF package in .NET. |
| Comments panel | TsgcPDFCommentsView (VCL) and TsgcPDFCommentsViewFMX list every annotation by page with author, date, contents and threaded replies, synchronized with the viewer. |
| Image viewer and editor | TsgcPDFImageEditor (VCL), TsgcPDFImageEditorFMX, and in .NET TsgcPDFImageEditor (WinForms), TsgcWpfPDFImageEditor and TsgcAvaloniaPDFImageEditor show a photo or a scanned page with zoom, pan and fit modes, rotate, flip and crop it, and draw pen, line, arrow, rectangle, ellipse, text and highlight annotations, with undo and redo. The result is saved as PNG, JPEG or BMP, or ExportToPDF writes a PDF page with the original image and the annotations as vector graphics. The loaded image is never changed: the edits are saved as JSON and loaded again later, and ReadOnly turns the control into a viewer. Help |
| Raster renderer for servers | TsgcPDFRendererRaster is a pure Pascal rasterizer that renders pages to pixels or PNG without GDI, on Windows and Linux. |
| GDI renderer and export | Render to a bitmap or a device context on Windows, and export pages and thumbnails to BMP, PNG or JPEG with TsgcPDFExporter. |
| Graphics model | DeviceGray, DeviceRGB, DeviceCMYK, Indexed, ICCBased and Lab color spaces, axial and radial shadings, tiling patterns, soft masks, blend opacity and form XObjects. |
| Fonts | Embedded TrueType, CFF, OpenType and Type 1 font programs are rendered from their outlines, with the standard encodings and Identity-H CID fonts. |
| Image decoders | Flate, LZW, ASCII85, ASCIIHex, RunLength, JPEG (baseline and progressive, CMYK), JPEG 2000, CCITT Group 3 and 4, and JBIG2. |
procedure AnnotatePhoto(aEditor: TsgcPDFImageEditor; const aFileName: string);
var
oModel: TsgcPDFImageEditorModel;
oArrow, oNote: TsgcPDFImageAnnotation;
begin
aEditor.LoadFromFile(aFileName);
oModel := aEditor.Model;
oModel.SaveUndoState;
// crop: source pixels, the annotations below use output pixels
oModel.CropRect := sgcPDFImageRect(40, 30, 840, 630);
// an arrow from the start point to the tip
oArrow := oModel.Annotations.Add(iakArrow);
oArrow.Color := $FFFF0000;
oArrow.Width := 5;
oArrow.AddPoint(120, 420);
oArrow.AddPoint(360, 240);
// a text note: Rect is the text box, FontSize in points
oNote := oModel.Annotations.Add(iakText);
oNote.Color := $FF0000FF;
oNote.FontName := 'Arial';
oNote.FontSize := 18;
oNote.Text := 'Scratch on the door';
oNote.Rect := sgcPDFImageRect(60, 440, 360, 480);
oModel.Changed;
// PNG from the extension, the image and the annotations flattened
aEditor.SaveToFile(ChangeFileExt(aFileName, '.edited.png'));
// the image placed unchanged, the annotations as vector paths and text
aEditor.ExportToPDF(ChangeFileExt(aFileName, '.pdf'));
// the edits as JSON, to edit them again later
aEditor.SaveEditsToFile(ChangeFileExt(aFileName, '.json'));
end;
Crops the photo, adds an arrow and a text note in code with undo, then writes a flattened PNG, a PDF page with vector annotations and the edits as JSON. Units: sgcPDF_ImageEditor, sgcPDF_ImageEditor_VCL. See TsgcPDFImageEditor.
| Feature | Details |
|---|---|
| Text | Page text or whole document text, with Unicode mapping of embedded and CID fonts. |
| Text positions | TsgcPDFTextExtractor returns each text fragment with X, Y, font name and font size. |
| Search | Find text on a page or in the document. |
| Images | TsgcPDFImageExtractor enumerates the images of a page, including inline images and images inside form XObjects, and decodes them to PNG, JPEG or BMP. |
| Metadata and attachments | Document information, XMP metadata, bookmarks, layers and embedded files. |
| Feature | Details |
|---|---|
| Create forms | Text fields, check boxes, radio buttons, combo boxes, list boxes and push buttons with appearance streams. |
| Fill and flatten | Set field values in code or in the viewer, then flatten the form into static page content. |
| Form filling in the WPF and Avalonia viewers | With FormFilling (on by default) users fill text fields, check boxes, radio buttons, combo boxes and list boxes in TsgcWpfPDFViewer and TsgcAvaloniaPDFViewer, and Tab moves through the fields in their tab order. OnFieldChange fires once for each committed value, Esc keeps the old value, and Core.Document.SaveToFile saves the filled form. |
| FDF and XFDF | Import and export form data as FDF and XFDF. |
| Feature | Details |
|---|---|
| Password encryption | RC4 40 bit and 128 bit, AES-128 and AES-256 (revisions 5 and 6), with user and owner passwords and permission flags. Encrypted files are decrypted on load. |
| Certificate encryption | Public key encryption for one or more recipient certificates (adbe.pkcs7.s4 and adbe.pkcs7.s5). |
| Digital signatures | Sign with a PFX certificate, visible or invisible signature fields, SHA-256, SHA-384 and SHA-512, RFC 3161 timestamps and document timestamps. |
| Handwritten signatures | TsgcPDFSignaturePad (VCL), TsgcPDFSignaturePadFMX, and in .NET TsgcPDFSignaturePad (WinForms), TsgcWpfPDFSignaturePad and TsgcAvaloniaPDFSignaturePad capture a signature with the mouse, a touch screen or a pen. The width follows the pen pressure (pointer messages on VCL and WinForms, the stylus on WPF and Avalonia; FireMonkey reports no pressure) and the speed, the strokes are smoothed into curves, and undo and redo work. The signature is saved as PNG, SVG or JSON, and ApplyToSignature puts it into the visible field of a digital signature as vector ink and a PNG image. A PNG or JPEG in Appearance.ImageData, such as a scanned signature, is drawn in the field too. Help |
| PAdES via sgcSign | TsgcPDFPAdESSigner produces ETSI.CAdES.detached signatures at levels B-B, B-T, B-LT and B-LTA, with DSS validation data, using any key provider of sgcSign (PEM, PFX, PKCS#11, Windows certificate store, cloud HSMs). sgcSign is licensed separately. |
| Verification | TsgcPDFSignatureVerifier checks integrity, byte range coverage, the signer certificate and the certificate chain of every signature. |
| Redaction | TsgcPDFRedactor removes text at glyph level, image pixels, vector paths and annotations under a region or matching a text, adds an overlay and can strip metadata. The removed text cannot be extracted from the output. |
| Text to outlines | TsgcPDFTextOutliner replaces every glyph with a vector path of the same position, color and size, in page content, form XObjects, tiling patterns, Type3 fonts and annotation appearances, then removes the fonts left unused. The file prints and looks the same but no longer needs any font, which suits print shops, RIPs and font licenses that forbid embedding. Text in fonts that are not embedded is outlined with the substitute system font a viewer would use, and invisible text is removed. The text can no longer be selected or searched. |
procedure CreateEncryptedPDF(const AFileName: string);
var
oPDF: TsgcPDFDocument;
begin
oPDF := TsgcPDFDocument.Create;
try
oPDF.AddPage(595, 842).DrawText('Secret', 50, 780, sfHelveticaBold, 24);
// user password opens the file, owner password grants full rights
oPDF.SetEncryption(emAES_256, 'user123', 'owner456');
oPDF.SaveToFile(AFileName);
finally
oPDF.Free;
end;
end;
procedure SignPDF(const AInput, AOutput: string);
var
oSigner: TsgcPDFSignatureHandler;
begin
oSigner := TsgcPDFSignatureHandler.Create;
try
oSigner.LoadCertificateFromPFX('signer.pfx', 'test123');
oSigner.Reason := 'Document approval';
oSigner.Location := 'Barcelona';
oSigner.HashAlgorithm := shaSHA256;
// visible signature field on page 1: Left, Bottom, Right, Top
oSigner.SetField('Signature1', 0, 50, 50, 250, 100);
oSigner.SignDocument(AInput, AOutput);
finally
oSigner.Free;
end;
end;
procedure SignWithStoredSignature(const aJSONFile, aInput, aOutput: string);
var
oModel: TsgcPDFSignaturePadModel;
oStream: TFileStream;
oSigner: TsgcPDFSignatureHandler;
vAppearance: TsgcPDFSignatureAppearance;
begin
oModel := TsgcPDFSignaturePadModel.Create;
try
// the strokes saved before with SaveToJSON
oStream := TFileStream.Create(aJSONFile, fmOpenRead or fmShareDenyWrite);
try
oModel.LoadFromJSON(oStream);
finally
oStream.Free;
end;
oSigner := TsgcPDFSignatureHandler.Create;
try
oSigner.LoadCertificateFromPFX('signer.pfx', 'test123');
oSigner.SetField('Signature1', 0, 50, 50, 300, 120);
vAppearance := oSigner.Appearance;
// ImageData: a PNG of the ink, InkContent: the vector ink
oModel.ApplyToAppearance(vAppearance);
vAppearance.ShowName := True;
vAppearance.ShowDate := True;
vAppearance.Text := 'Approved';
oSigner.Appearance := vAppearance;
oSigner.SignDocument(aInput, aOutput);
finally
oSigner.Free;
end;
finally
oModel.Free;
end;
end;
Loads a signature saved as JSON by a signature pad and signs with no form, for example on a server. The field shows the ink next to the name, the date and the text. On a form, TsgcPDFSignaturePad.ApplyToSignature does the same in one call. See the digital signatures guide.
procedure SignPAdES(const AInput, AOutput: string);
var
oKey: TsgcPEMKeyProvider;
oSigner: TsgcPDFPAdESSigner;
begin
oKey := TsgcPEMKeyProvider.Create(nil);
oSigner := TsgcPDFPAdESSigner.Create(nil);
try
// any sgcSign key provider: PEM, PFX, PKCS#11, Windows store, cloud HSM
oKey.LoadFromFile('signer.pem', 'signer.key');
oSigner.KeyProvider := oKey;
// paBB, paBT (timestamp), paBLT and paBLTA (long term validation)
oSigner.Level := paBB;
// signature field and appearance through the sgcPDF handler
oSigner.Handler.SetField('Signature1', 0, 350, 50, 550, 110);
oSigner.Handler.SignerName := 'John Smith';
oSigner.Handler.Reason := 'Approved';
oSigner.SignPDFFile(AInput, AOutput);
oSigner.KeyProvider := nil;
finally
oSigner.Free;
oKey.Free;
end;
end;
procedure RedactFile(const AInput, AOutput: string);
var
oRedactor: TsgcPDFRedactor;
vOptions: TsgcPDFRedactionOptions;
begin
oRedactor := TsgcPDFRedactor.Create;
try
// every occurrence of a text, on all pages
oRedactor.AddText('John Smith');
// an area of page 0: left, bottom, right, top in points
oRedactor.AddArea(0, 50, 500, 250, 650);
vOptions := oRedactor.Options;
vOptions.OverlayText := 'REDACTED';
vOptions.RemoveMetadata := True;
oRedactor.Options := vOptions;
oRedactor.Apply(AInput, AOutput);
finally
oRedactor.Free;
end;
end;
procedure OutlineText(const AInput, AOutput: string);
var
oOutliner: TsgcPDFTextOutliner;
begin
oOutliner := TsgcPDFTextOutliner.Create;
try
// every glyph becomes a vector path, unused fonts are removed
oOutliner.Apply(AInput, AOutput);
WriteLn('Glyphs outlined: ', oOutliner.ConvertedGlyphs);
WriteLn('Fonts removed: ', oOutliner.RemovedFonts);
finally
oOutliner.Free;
end;
end;
| Feature | Details |
|---|---|
| PDF/A | PDF/A-1, PDF/A-2 and PDF/A-3 output at levels a and b, and PDF/A-4 and PDF/A-4f (paA4, paA4f) as PDF 2.0 files, with XMP metadata, output intent and embedded fonts. In Delphi and .NET. |
| Validator | TsgcPDFAValidator checks a file against the selected PDF/A level, including PDF/A-4 and PDF/UA-2, and reports errors and warnings. The PDF/A-4, PDF/A-4f and PDF/UA-2 output is checked against veraPDF. |
| Tagged PDF | Structure tree with Document, Part, Sect, H1 to H6, P, L, LI, Table, TR, TH, TD and Figure with alternate text, marked content, role map, language and MarkInfo. |
| PDF/UA-1 | Accessible output together with PDF/A-2a or PDF/A-3a, and PDF/UA-1 checks in the validator. |
| PDF/UA-2 | Set PDFUAPart to puaPart2 for PDF/UA-2 (ISO 14289-2) output, alone or together with PDF/A-4, with the PDF 2.0 structure namespace and structure destinations. In Delphi and .NET, including the sgcReports export and the sgcUIPDF bridge. |
| Attachments | Embedded files with MIME type, dates and PDF/A-3 and PDF/A-4f associated file relationships. |
| Factur-X and ZUGFeRD | Embeds the invoice XML with the Factur-X XMP extension schema for the Minimum, Basic WL, Basic, EN 16931, Extended and XRechnung profiles, and saves the file as PDF/A-3b. |
procedure CreateFacturX(const AInvoiceXML, AFileName: string);
var
oPDF: TsgcPDFDocument;
oXML: TMemoryStream;
vXML: TBytes;
vFont: Integer;
begin
oPDF := TsgcPDFDocument.Create;
oXML := TMemoryStream.Create;
try
// the invoice XML (CII) is created by your application
oXML.LoadFromFile(AInvoiceXML);
SetLength(vXML, oXML.Size);
Move(oXML.Memory^, vXML[0], oXML.Size);
oPDF.Info.Title := 'Invoice 2026-001';
// PDF/A requires embedded fonts
vFont := oPDF.AddTrueTypeFont('Arial', False, False);
oPDF.AddPage(595, 842).DrawTextTT('Invoice 2026-001', 50, 780, vFont, 18);
// embeds factur-x.xml, adds the Factur-X XMP schema, saves as PDF/A-3b
oPDF.Attachments.AddFacturX(vXML, fxpEN16931);
oPDF.SaveToFile(AFileName);
finally
oXML.Free;
oPDF.Free;
end;
end;
procedure ValidatePDFA(const AFileName: string);
var
oParser: TsgcPDFParser;
oValidator: TsgcPDFAValidator;
i: Integer;
begin
oParser := TsgcPDFParser.Create;
oValidator := TsgcPDFAValidator.Create(paA3b);
try
oParser.LoadFromFile(AFileName);
oParser.Parse;
if oValidator.Validate(oParser) then
WriteLn('PDF/A-3b: no errors')
else
for i := 0 to oValidator.Errors.Count - 1 do
WriteLn('Error: ', oValidator.Errors[i]);
finally
oValidator.Free;
oParser.Free;
end;
end;
procedure CreateArchive(const AFileName: string);
var
oPDF: TsgcPDFDocument;
oPage: TsgcPDFPage;
vFont: Integer;
begin
oPDF := TsgcPDFDocument.Create;
try
oPDF.Info.Title := 'Annual report';
oPDF.Tagged := True;
oPDF.StructureTree.Lang := 'en-US';
// PDF/A-4 and PDF/UA-2 in the same PDF 2.0 file
oPDF.SetPDFALevel(paA4);
oPDF.PDFUA := True;
oPDF.PDFUAPart := puaPart2;
vFont := oPDF.AddTrueTypeFont('Arial', False, False);
oPage := oPDF.AddPage(595, 842);
oPage.Tagging.BeginElement(stH1);
oPage.DrawTextTT('Annual report', 50, 770, vFont, 20);
oPage.Tagging.EndElement;
oPage.Tagging.BeginElement(stP);
oPage.DrawTextTT('Archived and accessible.', 50, 740, vFont, 11);
oPage.Tagging.EndElement;
oPDF.SaveToFile(AFileName);
finally
oPDF.Free;
end;
end;
To validate the file, create the TsgcPDFAValidator with paA4 and set its PDFUA and PDFUAPart properties. See the PDF/A-4 and PDF/UA-2 help topics.
The same prepress API in Delphi and .NET, with the same names.
| Feature | Details |
|---|---|
| Page boxes | MediaBox, CropBox, BleedBox, TrimBox and ArtBox on TsgcPDFPage, with Rotate and UserUnit, kept when a file is loaded and saved. |
| Imposition | AddPageAsForm turns a page of another document, cut by a page box or a rectangle, into a form XObject that DrawForm, DrawFormInRect and DrawFormMatrix place on a sheet. The PDFImposition demo builds sheet layouts with them. |
| Printer's marks | DrawCropMarks, DrawBleedMarks, DrawRegistrationMark, DrawColorBar and DrawSlugText. |
| Spot colours | Separation, Registration and DeviceN colour spaces, and overprint graphics states for fill and stroke. |
| Overprint preview | OverprintPreview on the renderer simulates overprinting on screen and in raster output. |
| PDF/X output intent | SetOutputIntent writes a GTS_PDFX output intent with an optional ICC profile, and PDFXVersion sets the PDF/X version key. |
| Viewer tools | Page box display, page box hints and a measure tool in the VCL and WinForms viewers, and in the WPF and Avalonia viewers. |
using esegece.sgcPDF;
using static esegece.sgcPDF.sgcPDF_Types;
using (TsgcPDFDocument oSource = new TsgcPDFDocument())
using (TsgcPDFDocument oSheet = new TsgcPDFDocument())
{
oSource.LoadFromFile("flyer.pdf");
// two A4 pages side by side, placed by their trim box, with crop marks
TsgcPDFPage oPage = oSheet.AddPage(1270, 922);
for (int i = 0; i < 2; i++)
{
int vForm = oSheet.AddPageAsForm(oSource, i, TsgcPDFPageBox.ppbTrimBox);
TsgcPDFRect oTrim = sgcPDFRect(40 + i * 595, 40, 635 + i * 595, 882);
oPage.DrawFormInRect(vForm, oTrim, true);
oPage.DrawCropMarks(oTrim);
}
oSheet.SaveToFile("sheet.pdf");
}
A fully managed C# port of the library, one C# file per Delphi unit, with the same class names (TsgcPDFDocument, TsgcPDFPage, TsgcPDFEditor and so on). It is delivered as NuGet packages, each also available as a free Community edition with the .Community suffix.
| Package | Details |
|---|---|
esegece.sgcPDF | The library: document model, parser, writer, editor, renderer core, fonts, images, forms, signatures, encryption, text and image extraction, prepress, PDF/A (including PDF/A-4) and PDF/UA-2. Targets .NET Standard 2.0, .NET Framework 4.7.2, .NET 6, .NET 8, .NET 9 and .NET 10. |
esegece.sgcPDF.WinForms | GDI renderer and canvas, EMF playback, page export to images, and the TsgcPDFViewerControl (with interactive annotations and comment replies), TsgcPDFThumbnailView, TsgcPDFBarcodeControl, TsgcPDFOutlineView, TsgcPDFSignaturePad and TsgcPDFImageEditor controls, with page boxes and the measure tool. Targets .NET Framework 4.7.2 and .NET 8 on Windows. |
esegece.sgcPDF.Wpf | WPF viewer: TsgcWpfPDFViewer, TsgcWpfPDFThumbnailView and TsgcWpfPDFOutlineView, plus TsgcWpfPDFBarcodeControl, TsgcWpfPDFSignaturePad and TsgcWpfPDFImageEditor. Targets .NET Framework 4.7.2, .NET 8, .NET 9 and .NET 10 on Windows. |
esegece.sgcPDF.Avalonia | Avalonia viewer: TsgcAvaloniaPDFViewer, TsgcAvaloniaPDFThumbnailView and TsgcAvaloniaPDFOutlineView, plus TsgcAvaloniaPDFBarcodeControl, TsgcAvaloniaPDFSignaturePad and TsgcAvaloniaPDFImageEditor. Targets .NET 8, .NET 9 and .NET 10. |
esegece.sgcPDF.sgcSign | Optional bridge to sgcSign .NET: TsgcPDFPAdESSigner signs to PAdES B-B, B-T, B-LT and B-LTA with any sgcSign key provider. |
| Community edition | Same features as the Registered edition. Free for individuals and organizations under EUR 1M annual gross revenue with no more than 5 developers, with a brief startup notice. The packages have the same ids with the .Community suffix, for example esegece.sgcPDF.Community. |
dotnet add package esegece.sgcPDF
dotnet add package esegece.sgcPDF.WinForms
dotnet add package esegece.sgcPDF.Wpf
dotnet add package esegece.sgcPDF.Avalonia
dotnet add package esegece.sgcPDF.sgcSign