Repository navigation
1.0.0 #40
gvreddy04
announced in
Announcements
1.0.0
#40
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
UnlimitedPDF 1.0.0 is the first stable release of the pure .NET PDF library. Beyond creating PDFs with text and tables, it can now merge and split existing PDFs, convert HTML to PDF with its own renderer, continue tables across pages, add headers, footers, and page numbers, and place JPEG and PNG images. It targets .NET 6, 8, 9, 10, and 11, has no third-party dependencies, and runs anywhere .NET runs, including Blazor WebAssembly.
1.0.0 also renames part of the public API so that names follow one convention. Code written for 0.0.x needs the new names. See Upgrading from 0.0.x.
Highlights
What's New
Merge PDFs
PdfFileandPdfFileLoadOptionsload existing PDFs;PdfFileExceptionreports files that can't be read.PdfOperations.Mergejoins whole files in one call.PdfDocument.AddPagesadds page ranges from loaded files next to pages you build.Split PDFs
PdfOperations.SplitandPdfOperations.SplitAsyncsplit a PDF every N pages or byPdfPageRange.PdfSplitPart) is written to a folder or to a stream of your own;PdfSplitExceptionreports problems.HTML to PDF
PdfHtmlloads HTML from a string, a file, or a stream, andPdfOperations.ConvertHtmlandConvertHtmlAsyncconvert it in one call.PdfBodyFlow.AddHtmlmixes it with other content.colspanandrowspan, PNG and JPEG images,<style>and linked stylesheets, clickable links, and headings as bookmarks.theadrows repeat on every page, andbreak-before,break-after,break-inside: avoid, andpage-break-*are honored.data:URIs, the HTML's own folder, or yourResourceResolver; the library never reads the network or paths outside the base folder.PdfHtml.Warnings. SetFailOnWarningto throwPdfHtmlExceptioninstead, and size limits keep hostile input in check.Page layout
PdfDocument.MarginTop,MarginBottom,PdfTable.HeaderRowCount,PdfTable.RepeatHeaderRows). Tables that fit their page are drawn exactly as before.PdfDocument.Header,Footer,Body,BodyMarginTop,BodyMarginBottom,AddPageSettings,MarginLeft, andMarginRight.PdfPage.AddRectangle.Images, colors, and units
PdfImageandPdfPage.AddImagefor JPEG and PNG; images and stacked content in table cells; row height modes (PdfRowHeightMode).PdfColor.FromRgb(0, 172, 140),PdfColor.FromHex("#002A73").PdfUnits.Platforms
net11.0target, alongsidenet6.0,net8.0,net9.0, andnet10.0.What's Changed
Breaking: renamed API
Every public type is now in the
UnlimitedPDFnamespace, sousing UnlimitedPDF;is the onlyusingyou need. Old names are removed, so 0.0.x code reports compile errors until it uses the new names. Generated PDFs are unchanged.Fixes and behavior changes
PdfCell.Textnow reads and writes the cell's first text item; text-only cells behave as before.VerticalAlignmentset toToporBottomare now drawn that way (it had no effect before).PdfPage.AddTextchecks its input.Package and docs
Upgrading from 0.0.x
using UnlimitedPDF.Enums;,using UnlimitedPDF.Models.Table;,using UnlimitedPDF.Extensions;UnlimitedPDF)PdfPageBuilderPdfPagePdfTableRowPdfRowPdfTableColumnPdfColumnPdfTableCellPdfCellPdfPageBuilder.AddText(string text, int x, int y, int fontSize, string fontName)PdfPage.AddText(string text, double x, double y, double fontSize = 12)(no font name; there is one font)PdfTable.ColCountPdfTable.ColumnCountPdfTable.TrimEmptyTrailingRowsAndCols()PdfTable.TrimEmptyTrailingRowsAndColumns()PdfTable.EnsureSize(rows, cols)PdfTable.EnsureSize(rows, columns)colparameter ofPdfTable.GetCell,GetOrCreateCell,SetCell,SetTextcolumn(only named arguments change)new PdfTableRow(index, initialCols)new PdfRow(index, initialColumns)colIndexparameter ofPdfTableRow.GetCell,SetCellcolumnIndex(only named arguments change)PdfTableCell.BackgroundPdfCell.BackgroundColorPdfTableCell.ColSpanPdfCell.ColumnSpanPdfTableCell.HAlign/VAlignPdfCell.HorizontalAlignment/VerticalAlignmentPdfTableCell.TopBorder,BottomBorder,LeftBorder,RightBorderPdfCell.BorderTop,BorderBottom,BorderLeft,BorderRightPdfTable.GetEffectiveColumnWidths(),NormalizeSpans(),IsSameSpanCell(...)PdfPageSize.ToMediaBoxString()ToDimensions()for the size in pointsKnown limitations (HTML to PDF)
alttext.?.prelines don't wrap, so a line wider than the page is clipped; usewhite-space: pre-wrapto wrap it.Links
This discussion was created from the release 1.0.0.
All reactions