Releases: iAJTin/iPdfWriter
Upgrade version to 1.0.7, fix security issue CVE-2023-29331
Changed
-
The Microsoft.Windows.Compatibility nuget package has been updated to fix security issue CVE-2023-29331 (.NET Denial of Service Vulnerability)
-
I M P O R T A N T!!
Now the minimum version of the full framework goes from 4.6.1 to 4.6.2
-
Library versions for this version
Library Version Description iPdfWriter 1.0.0.7 Pdf Writer iTin.Core 2.0.0.6 Base library containing various extensions, helpers, common constants iTin.Core.Drawing 1.0.0.4 Drawing objects, extension, helpers, common constants iTin.Core.Hardware.Abstractions 1.0.0.0 Generic Common Hardware Abstractions iTin.Core.Hardware.Common 1.0.0.5 Common Hardware Infrastructure iTin.Core.Hardware.Linux.Devices.Graphics.Font 1.0.0.1 Linux Hardware Infrastructure iTin.Core.Hardware.MacOS.Devices.Graphics.Font 1.0.0.1 MacOS Hardware Infrastructure iTin.Core.Hardware.Windows.Devices.Graphics.Font 1.0.0.1 Windows Hardware Infrastructure iTin.Core.Interop.Shared 1.0.0.4 Generic Shared Interop Definitions iTin.Core.Interop.Windows.Devices 1.0.0.1 Win32 Generic Interop Calls iTin.Core.IO 1.0.0.3 Common I/O calls iTin.Core.IO.Compression 1.0.0.3 Compression library iTin.Core.Models 1.0.0.4 Data models base iTin.Core.Models.Design.Charting 1.0.0.4 Base charting models iTin.Core.Models.Design.Styling 1.0.0.4 Base styling models iTin.Hardware.Abstractions.Devices.Graphics.Font 1.0.0.1 Generic Common Hardware Abstractions iTin.Logging 1.0.0.2 Logging library iTin.Registry.Windows 1.0.0.3 Windows registry access iTin.Utilities.Pdf.Design 1.0.0.6 Pdf design objects
Fix errors of nuget package v1.0.7
Decoupling to use the iPdfWriter.Abstractions nuget package, add more methods for use Span<T>
Added
- Now uses iPdfWriter.Abstractions.
Changed
-
I M P O R T A N T!!
Changed the iTin.Utilities.Pdf.Writer namespace to iPdfWriter
-
Rename test folder for samples folder
-
Library versions for this version
Library Version Description iPdfWriter 1.0.0.6 Pdf Writer iTin.Core 2.0.0.6 Base library containing various extensions, helpers, common constants iTin.Core.Drawing 1.0.0.3 Drawing objects, extension, helpers, common constants iTin.Core.Hardware.Abstractions 1.0.0.0 Generic Common Hardware Abstractions iTin.Core.Hardware.Common 1.0.0.5 Common Hardware Infrastructure iTin.Core.Hardware.Linux.Devices.Graphics.Font 1.0.0.1 Linux Hardware Infrastructure iTin.Core.Hardware.MacOS.Devices.Graphics.Font 1.0.0.1 MacOS Hardware Infrastructure iTin.Core.Hardware.Windows.Devices.Graphics.Font 1.0.0.1 Windows Hardware Infrastructure iTin.Core.Interop.Shared 1.0.0.4 Generic Shared Interop Definitions iTin.Core.Interop.Windows.Devices 1.0.0.1 Win32 Generic Interop Calls iTin.Core.IO 1.0.0.3 Common I/O calls iTin.Core.IO.Compression 1.0.0.3 Compression library iTin.Core.Models 1.0.0.3 Data models base iTin.Core.Models.Design.Charting 1.0.0.3 Base charting models iTin.Core.Models.Design.Styling 1.0.0.3 Base styling models iTin.Hardware.Abstractions.Devices.Graphics.Font 1.0.0.1 Generic Common Hardware Abstractions iTin.Logging 1.0.0.2 Logging library iTin.Registry.Windows 1.0.0.3 Windows registry access iTin.Utilities.Pdf.Design 1.0.0.5 Pdf design objects
Removed
Library | Version | Description |
---|---|---|
iTin.Utilities.Abstractions.Writer | 1.0.0.0 | Generic Common Writer's Abstractions |
Support for async calls and Span<T> for supported platforms
Added
-
Add support for asynchronous calls in solution projects.
-
Added support for using Span for supported platforms.
-
Test projects to show asynchronous usage.
-
The functionality of being able to create an instance of the PdfInput class from HTML code has been added.
For more information, please see the sample15 in [README.md] file -
A functionality has been added that allows to add or modify the metadata information of a pdf file.
For more information, please see the sample16 in [README.md] file -
A functionality has been added that allows to add a password to pdf file.
For more information, please see the sample17 in [README.md] file -
A functionality has been added that allows to insert an image into a pdf file.
For more information, please see the sample18 in [README.md] file
Changed
-
Library versions for this version
Library Version Description iTin.Core 2.0.0.6 Base library containing various extensions, helpers, common constants iTin.Core.Drawing 1.0.0.3 Drawing objects, extension, helpers, common constants iTin.Core.Hardware.Abstractions 1.0.0.0 Generic Common Hardware Abstractions iTin.Core.Hardware.Common 1.0.0.5 Common Hardware Infrastructure iTin.Core.Hardware.Linux.Devices.Graphics.Font 1.0.0.1 Linux Hardware Infrastructure iTin.Core.Hardware.MacOS.Devices.Graphics.Font 1.0.0.1 MacOS Hardware Infrastructure iTin.Core.Hardware.Windows.Devices.Graphics.Font 1.0.0.1 Windows Hardware Infrastructure iTin.Core.Interop.Shared 1.0.0.4 Generic Shared Interop Definitions iTin.Core.Interop.Windows.Devices 1.0.0.1 Win32 Generic Interop Calls iTin.Core.IO 1.0.0.3 Common I/O calls iTin.Core.IO.Compression 1.0.0.3 Compression library iTin.Core.Models 1.0.0.3 Data models base iTin.Core.Models.Design.Charting 1.0.0.3 Base charting models iTin.Core.Models.Design.Styling 1.0.0.3 Base styling models iTin.Hardware.Abstractions.Devices.Graphics.Font 1.0.0.1 Generic Common Hardware Abstractions iTin.Logging 1.0.0.2 Logging library iTin.Registry.Windows 1.0.0.3 Windows registry access iTin.Utilities.Abstractions.Writer 1.0.0.0 Generic Common Writer's Abstractions iTin.Utilities.Pdf.Design 1.0.0.5 Pdf design objects iTin.Utilities.Pdf.Writer 1.0.0.4 Pdf Writer
Add TextLines method, handle exceptions, samples
Added
-
Add TextLines method to PdfInput class, for get the lines of text for an PdfInput, optionally you can set both the start and end pages and a value indicating whether blank lines are included in the result or uses a predicate for filtering
// Creates pdf file reference var doc = new PdfInput { Input = "~/Resources/Sample-24/file-sample.pdf" }; // Extract text lines (Remove empty lines) try { var textLines = doc.TextLines(); logger.Info(" > Document lines (Remove empty lines)"); logger.Info($" > Count: {textLines.Count()}"); } catch { logger.Info(" > Error while extract text lines"); } // Extract text lines (Include empty lines) try { var textLines = doc.TextLines(removeEmptyLines: false); logger.Info(" > Document lines (Include empty lines)"); logger.Info($" > Count: {textLines.Count()}"); } catch { logger.Info(" > Error while extract text lines"); } // Extract text lines (predicate) try { var textLines = doc.TextLines(line => line.Text.Trim() == "#TITLE#"); logger.Info(" > Document lines (Predicate)"); logger.Info($" > Count: {textLines.Count()}"); } catch { logger.Info(" > Error while extract text lines"); }
Changed
-
Library versions for this version
Library Version Description iTin.Core 2.0.0.4 Base library containing various extensions, helpers, common constants iTin.Core.Drawing 1.0.0.2 Drawing objects, extension, helpers, common constants iTin.Core.Hardware.Common 1.0.0.3 Common Hardware Infrastructure iTin.Core.Hardware.Linux.Devices.Graphics.Font 1.0.0.0 Linux Hardware Infrastructure iTin.Core.Hardware.MacOS.Devices.Graphics.Font 1.0.0.0 MacOS Hardware Infrastructure iTin.Core.Hardware.Windows.Devices.Graphics.Font 1.0.0.0 Windows Hardware Infrastructure iTin.Core.IO 1.0.0.2 Common I/O calls iTin.Core.IO.Compression 1.0.0.2 Compression library iTin.Core.Interop.Shared 1.0.0.2 Generic Shared Interop Definitions iTin.Core.Interop.Windows.Devices 1.0.0.0 Win32 Generic Interop Calls iTin.Core.Models 1.0.0.2 Data models base iTin.Core.Models.Design.Charting 1.0.0.2 Base charting models iTin.Core.Models.Design.Styling 1.0.0.2 Base styling models iTin.Logging 1.0.0.1 Logging library iTin.Hardware.Abstractions.Devices.Graphics.Font 1.0.0.0 Generic Common Hardware Abstractions iTin.Registry.Windows 1.0.0.2 Windows registry access iTin.Utilities.Pdf.Design 1.0.0.4 Pdf design objects iTin.Utilities.Pdf.Writer 1.0.0.3 Pdf Writer
Add Fonts, ExtractPages, NumberOfPages use of enumerables...
Fixes
- Fixes an error that occurred when trying to load a style from file and this file does not have any extension.
Added
- Add support for netstandard2.1
-
Add SplitEnumerator ref struct.
-
Add support for the use of the ~ character in the iTin.Core.IO library
-
ByteReader class rewritten to work with Span in net core projects.
-
Add sample project for net60
-
Added the ability to create a table from a typed enumerable and from a datatable
To do this, two new methods have been added to the PdfTable static class.
There are two overloads for each method, one to render the table applying ccs styles,
this functionality is implemented and the other rendering the table natively,
it is currently under developmentMethod Description PdfTable.CreateFromEnumerable(..) please see [sample16.cs], [sample17.cs] PdfTable.CreateFromDataTable(..) please see [sample18.cs], [sample19.cs] Here is how to use them.
CreateFromEnumerable
doc.Replace(new ReplaceText( new WithTableObject { Text = "#DATA-TABLE#", UseTestMode = useTestMode, Offset = PointF.Empty, Style = TableStylesDictionary["Table"], ReplaceOptions = ReplaceTextOptions.FromPositionToRightMargin, Table = PdfTable.CreateFromEnumerable( new List<Person> { new Person {Name = "Name-01", Surname = "Surname-01"}, new Person {Name = "Name-02", Surname = "Surname-02"}, new Person {Name = "Name-03", Surname = "Surname-03"}, new Person {Name = "Name-04", Surname = "Surname-04"}, new Person {Name = "Name-05", Surname = "Surname-05"}, new Person {Name = "Name-06", Surname = "Surname-06"}, new Person {Name = "Name-07", Surname = "Surname-07"}, new Person {Name = "Name-08", Surname = "Surname-08"}, new Person {Name = "Name-09", Surname = "Surname-09"}, new Person {Name = "Name-10", Surname = "Surname-10"}, }) }));
CreateFromDataTable
doc.Replace(new ReplaceText( new WithTableObject { Text = "#DATA-TABLE#", UseTestMode = useTestMode, Offset = PointF.Empty, Style = PdfTableStyle.Default, ReplaceOptions = ReplaceTextOptions.FromPositionToRightMargin, Table = PdfTable.CreateFromDataTable( new List<Person> { new Person {Name = "Name-01", Surname = "Surname-01"}, new Person {Name = "Name-02", Surname = "Surname-02"}, new Person {Name = "Name-03", Surname = "Surname-03"}, new Person {Name = "Name-04", Surname = "Surname-04"}, new Person {Name = "Name-05", Surname = "Surname-05"}, new Person {Name = "Name-06", Surname = "Surname-06"}, new Person {Name = "Name-07", Surname = "Surname-07"}, new Person {Name = "Name-08", Surname = "Surname-08"}, new Person {Name = "Name-09", Surname = "Surname-09"}, new Person {Name = "Name-10", Surname = "Surname-10"}, } .ToDataTable<Person>("People")) }));
-
Unify calls to handle font from file, currently this functionality is only available for Windows systems,
The logic of each platform is in its own assembly iTin.Core.Hardware.Target-System.Devices.Graphics.Font.Where:
Target-System, it can be Linux, Windows or MacOS and the platform independent logic is found in the
iTin.Hardware.Abstractions.Devices.Graphics.Font assembly, so that a call is made independent of the target platform and this
assembly has the responsibility of managing the final call to the platform destination. -
Add ExtractPages method to PdfInput class for extract pages from an input.
// Creates pdf file reference var doc = new PdfInput { Input = "~/Resources/Sample-22/file-sample.pdf" }; // Extract pages var partialInput = doc.ExtractPages(1, 2); // Create output result var result = partialInput.CreateResult(); if (!result.Success) { // Handle errors } // Saves output result var saveResult = result.Result.Action(new SaveToFile { OutputPath = "~/Output/Sample22/Sample-22" }); if (!saveResult.Success) { // Handle errors }
-
Add NumberOfPages method to PdfInput class, for get number of pages of an input.
// Creates pdf file reference var doc = new PdfInput { Input = "~/Resources/Sample-22/file-sample.pdf" }; // Total pages of this reference document var pages = doc.NumberOfPages();
Changed
-
The way to render the replacements has been rewritten to achieve higher processing speeds, now we should notice an improvement in general times when processing a file.
-
Renamed TextOffet, ImageOffset and TableOffset properties for Offset property.
with text
// Before doc.Replace(new ReplaceText( new WithTextObject { Text = "#TITLE#", NewText = "Lorem ipsum", UseTestMode = useTestMode, TextOffset = PointF.Empty, ReplaceOptions = ReplaceTextOptions.AccordingToMargins, Style = (PdfTextStyle) PdfTextStyle.LoadFromFile("~Resources/Sample-18/Styles/TextStyle.json", format: KnownFileFormat.Json) })); // Now doc.Replace(new ReplaceText( new WithTextObject { Text = "#TITLE#", NewText = "Lorem ipsum", UseTestMode = useTestMode, Offset = PointF.Empty, ReplaceOptions = ReplaceTextOptions.AccordingToMargins, Style = (PdfTextStyle) PdfTextStyle.LoadFromFile("~Resources/Sample-18/Styles/TextStyle.json", format: KnownFileFormat.Json) }));
with image
// Before doc.Replace(new ReplaceText( new WithImageObject { Text = "#BAR-CHART#", UseTestMode = useTestMode, ImageOffset = PointF.Empty, Style = ImagesStylesTable["Default"], ReplaceOptions = ReplaceTextOptions.Default, Image = PdfImage.FromFile("~Resources/Sample-18/Images/bar-chart.png") })); // Now doc.Replace(new ReplaceText( new WithTextObject { Text = "#BAR-CHART#", UseTestMode = useTestMode, Offset = PointF.Empty, Style = ImagesStylesTable["Default"], ReplaceOptions = ReplaceTextOptions.Default, Image = PdfImage.FromFile("~Resources/Sample-18/Images/bar-chart.png") }));
with table
// Before doc.Replace(new ReplaceText( new WithTableObject { Text = "#DATA-TABLE#", UseTestMode = useTestMode, TableOffset = PointF.Empty, Style = PdfTableStyle.Default, ReplaceOptions = ReplaceTextOptions.FromPositionToRightMargin, Table = PdfTable.CreateFromHtml(GenerateHtmlDatatable()) })); // Now doc.Replace(new ReplaceText( new WithTableObject { Text = "#DATA-TABLE#", UseTestMode = useTestMode, Offset = PointF.Empty, Style = PdfTableStyle.Default, ReplaceOptions = ReplaceTextOptions.FromPositionToRightMargin, Table = PdfTable.CreateFromHtml(GenerateHtmlDatatable()) }));
-
Library versions for this version
Library Version Description iTin.Core 2.0.0.4 Base library containing various extensions, helpers, common constants iTin.Core.Drawing 1.0.0.2 Drawing objects, extension, helpers, common constants iTin.Core.Hardware.Common 1.0.0.3 Common Hardware Infrastructure iTin.Core.Hardware.Linux.Devices.Graphics.Font 1.0.0.0 Linux Hardware Infrastructure iTin.Core.Hardware.MacOS.Devices.Graphics.Font 1.0.0.0 MacOS Hardware Infrastructure iTin.Core.Hardware.Windows.Devices.Graphics.Font 1.0.0.0 Windows Hardware Infrastructure iTin.Core.IO 1.0.0.2 Common I/O calls iTin.Core.IO.Compression 1.0.0.2 Compression library iTin.Core.Interop.Shared 1.0.0.2 Generic Shared Interop Definitions iTin.Core.Interop.Windows.Devices 1.0.0.0 Win32 Generic Interop Calls iTin.Core.Models 1.0.0.2 Data models base iTin.Core.Models.Design.Charting 1.0.0.2 Base charting models iTin.Core.Models.Design.Styling 1.0.0.2 Base styling models iTin.Logging 1.0.0.1 Logging library iTin.Hardware.Abstractions.Devices.Graphics.Font 1.0.0.0 Generic Common Hardware Abstractions iTin.Registry.Windows 1.0.0.2 Windows registry access iTin.Utilities.Pdf.Design 1.0.0.3 Pdf design objects iTin.Utilities.Pdf.Writer 1.0.0.2 Pdf Writer
Upgrade to v1.0.2 - Fix nuget pakages in v1.0.1
Critical
-
Important!!!
Fixes an error caused in the previous version, the nuget packages were not updated correctly when creating the version
I'm sorry for the inconveniences...
Fixes
-
Upgrade Newtonsoft.Json nuget package to version 13.0.1 (without critical errors)
-
Fix an error that occurs when trying to create an html table with html5 tags (not supported)
Changed
-
Change license type to GNU
-
Library versions for this version
Library Version Description iTin.Core 2.0.0.3 Base library containing various extensions, helpers, common constants iTin.Core.Drawing 1.0.0.1 Drawing objects, extension, helpers, common constants iTin.Core.IO 1.0.0.0 Common I/O calls iTin.Core.IO.Compression 1.0.0.1 Compression library iTin.Core.Models 1.0.0.1 Data models base iTin.Core.Models.Design.Charting 1.0.0.1 Base charting models iTin.Core.Models.Design.Styling 1.0.0.1 Base styling models iTin.Logging 1.0.0.0 Logging library iTin.Registry.Windows 1.0.0.1 Windows registry access iTin.Utilities.Pdf.Design 1.0.0.2 Pdf design objects iTin.Utilities.Pdf.Writer 1.0.0.1 Pdf Writer
Update result classes for support more scenaries
Added
-
Library documentation.
-
tools
folder in solution root. Contains a script for update help md files.
Changed
-
Changed
IResultGeneric
interface. ChangedValue
property name byResult
(for code clarify).This change may have implications in your final code, it is resolved by changing Value to Result
-
Update result classes for support more scenaries.
-
Library versions for this version
Library Version Description iTin.Core 2.0.0.3 Base library containing various extensions, helpers, common constants iTin.Core.Drawing 1.0.0.1 Drawing objects, extension, helpers, common constants iTin.Core.IO 1.0.0.0 Common I/O calls iTin.Core.IO.Compression 1.0.0.1 Compression library iTin.Core.Models 1.0.0.1 Data models base iTin.Core.Models.Design.Charting 1.0.0.1 Base charting models iTin.Core.Models.Design.Styling 1.0.0.1 Base styling models iTin.Logging 1.0.0.0 Logging library iTin.Registry.Windows 1.0.0.1 Windows registry access iTin.Utilities.Pdf.Design 1.0.0.1 Pdf design objects iTin.Utilities.Pdf.Writer 1.0.0.1 Pdf Writer
Pdf Writer
Initial release