-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update to PDFtoImage 4.0.0 * Update unit tests
- Loading branch information
Showing
40 changed files
with
1,317 additions
and
1,347 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
namespace PDFtoZPL | ||
{ | ||
/// <summary> | ||
/// The supported encoding options for the bitmap within the generated ZPL code. | ||
/// </summary> | ||
public enum BitmapEncodingKind | ||
{ | ||
/// <summary> | ||
/// <b>Not recommended.</b> The bitmap is encoded as hexadecimals.<br/> | ||
/// Its output might be to large for the printer's bitmap storage area. | ||
/// </summary> | ||
Hexadecimal, | ||
|
||
/// <summary> | ||
/// The bitmap is encoded as hexadecimals and then compressed (via ZPL ASCII compression).<br/> | ||
/// It's significantly more space-saving than <see cref="Hexadecimal"/>. | ||
/// </summary> | ||
HexadecimalCompressed, | ||
|
||
/// <summary> | ||
/// <b>Not recommended.</b> The bitmap is encoded as Base64 (MIME). This encoding is referred to as <b>B64</b> in the ZPL II programming guide.<br/> | ||
/// Its output might be to large for the printer's bitmap storage area. Still more space-saving than <see cref="Hexadecimal"/> though. | ||
/// </summary> | ||
Base64, | ||
|
||
/// <summary> | ||
/// Recommended. The bitmap is compressed with Deflate (RFC 1951) and then encoded as Base64 (MIME). This encoding is referred to as <b>Z64</b> in the ZPL II programming guide. | ||
/// </summary> | ||
Base64Compressed | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
namespace PDFtoZPL | ||
{ | ||
/// <summary> | ||
/// The used dithering algorithem after downsampling to 1 bit monochrome. | ||
/// </summary> | ||
public enum DitheringKind | ||
{ | ||
/// <summary> | ||
/// No dithering. | ||
/// </summary> | ||
None, | ||
|
||
/// <summary> | ||
/// Use the Robert W. Floyd and Louis Steinberg dithering algorithm. | ||
/// </summary> | ||
FloydSteinberg, | ||
|
||
/// <summary> | ||
/// Use the Bill Atkinson dithering algorithm. | ||
/// </summary> | ||
Atkinson | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,34 @@ | ||
#nullable enable | ||
PDFtoZPL.BitmapEncodingKind | ||
PDFtoZPL.BitmapEncodingKind.Base64 = 2 -> PDFtoZPL.BitmapEncodingKind | ||
PDFtoZPL.BitmapEncodingKind.Base64Compressed = 3 -> PDFtoZPL.BitmapEncodingKind | ||
PDFtoZPL.BitmapEncodingKind.Hexadecimal = 0 -> PDFtoZPL.BitmapEncodingKind | ||
PDFtoZPL.BitmapEncodingKind.HexadecimalCompressed = 1 -> PDFtoZPL.BitmapEncodingKind | ||
PDFtoZPL.Conversion | ||
static PDFtoZPL.Conversion.ConvertBitmap(byte[]! bitmapAsByteArray, PDFtoZPL.Conversion.BitmapEncodingKind encodingKind = PDFtoZPL.Conversion.BitmapEncodingKind.HexadecimalCompressed, bool graphicFieldOnly = false, bool setLabelLength = false, byte threshold = 128, PDFtoZPL.Conversion.DitheringKind ditheringKind = PDFtoZPL.Conversion.DitheringKind.None) -> string! | ||
static PDFtoZPL.Conversion.ConvertBitmap(string! bitmapPath, PDFtoZPL.Conversion.BitmapEncodingKind encodingKind = PDFtoZPL.Conversion.BitmapEncodingKind.HexadecimalCompressed, bool graphicFieldOnly = false, bool setLabelLength = false, byte threshold = 128, PDFtoZPL.Conversion.DitheringKind ditheringKind = PDFtoZPL.Conversion.DitheringKind.None) -> string! | ||
static PDFtoZPL.Conversion.ConvertBitmap(System.IO.Stream! bitmapAsStream, bool leaveOpen, PDFtoZPL.Conversion.BitmapEncodingKind encodingKind = PDFtoZPL.Conversion.BitmapEncodingKind.HexadecimalCompressed, bool graphicFieldOnly = false, bool setLabelLength = false, byte threshold = 128, PDFtoZPL.Conversion.DitheringKind ditheringKind = PDFtoZPL.Conversion.DitheringKind.None) -> string! | ||
static PDFtoZPL.Conversion.ConvertBitmap(System.IO.Stream! bitmapAsStream, PDFtoZPL.Conversion.BitmapEncodingKind encodingKind = PDFtoZPL.Conversion.BitmapEncodingKind.HexadecimalCompressed, bool graphicFieldOnly = false, bool setLabelLength = false, byte threshold = 128, PDFtoZPL.Conversion.DitheringKind ditheringKind = PDFtoZPL.Conversion.DitheringKind.None) -> string! | ||
static PDFtoZPL.Conversion.ConvertBitmap(SkiaSharp.SKBitmap! bitmap, PDFtoZPL.Conversion.BitmapEncodingKind encodingKind = PDFtoZPL.Conversion.BitmapEncodingKind.HexadecimalCompressed, bool graphicFieldOnly = false, bool setLabelLength = false, byte threshold = 128, PDFtoZPL.Conversion.DitheringKind ditheringKind = PDFtoZPL.Conversion.DitheringKind.None) -> string! | ||
static PDFtoZPL.Conversion.ConvertPdf(byte[]! pdfAsByteArray, string? password = null, int dpi = 203, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, PDFtoZPL.Conversion.BitmapEncodingKind encodingKind = PDFtoZPL.Conversion.BitmapEncodingKind.HexadecimalCompressed, bool graphicFieldOnly = false, bool withAspectRatio = false, bool setLabelLength = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, byte threshold = 128, PDFtoZPL.Conversion.DitheringKind ditheringKind = PDFtoZPL.Conversion.DitheringKind.None, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> System.Collections.Generic.IEnumerable<string!>! | ||
static PDFtoZPL.Conversion.ConvertPdf(string! pdfAsBase64String, string? password = null, int dpi = 203, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, PDFtoZPL.Conversion.BitmapEncodingKind encodingKind = PDFtoZPL.Conversion.BitmapEncodingKind.HexadecimalCompressed, bool graphicFieldOnly = false, bool withAspectRatio = false, bool setLabelLength = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, byte threshold = 128, PDFtoZPL.Conversion.DitheringKind ditheringKind = PDFtoZPL.Conversion.DitheringKind.None, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> System.Collections.Generic.IEnumerable<string!>! | ||
static PDFtoZPL.Conversion.ConvertPdf(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null, int dpi = 203, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, PDFtoZPL.Conversion.BitmapEncodingKind encodingKind = PDFtoZPL.Conversion.BitmapEncodingKind.HexadecimalCompressed, bool graphicFieldOnly = false, bool withAspectRatio = false, bool setLabelLength = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, byte threshold = 128, PDFtoZPL.Conversion.DitheringKind ditheringKind = PDFtoZPL.Conversion.DitheringKind.None, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> System.Collections.Generic.IEnumerable<string!>! | ||
static PDFtoZPL.Conversion.ConvertPdf(System.IO.Stream! pdfStream, string? password = null, int dpi = 203, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, PDFtoZPL.Conversion.BitmapEncodingKind encodingKind = PDFtoZPL.Conversion.BitmapEncodingKind.HexadecimalCompressed, bool graphicFieldOnly = false, bool withAspectRatio = false, bool setLabelLength = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, byte threshold = 128, PDFtoZPL.Conversion.DitheringKind ditheringKind = PDFtoZPL.Conversion.DitheringKind.None, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> System.Collections.Generic.IEnumerable<string!>! | ||
static PDFtoZPL.Conversion.ConvertPdfPage(byte[]! pdfAsByteArray, string? password = null, int page = 0, int dpi = 203, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, PDFtoZPL.Conversion.BitmapEncodingKind encodingKind = PDFtoZPL.Conversion.BitmapEncodingKind.HexadecimalCompressed, bool graphicFieldOnly = false, bool withAspectRatio = false, bool setLabelLength = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, byte threshold = 128, PDFtoZPL.Conversion.DitheringKind ditheringKind = PDFtoZPL.Conversion.DitheringKind.None, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> string! | ||
static PDFtoZPL.Conversion.ConvertPdfPage(string! pdfAsBase64String, string? password = null, int page = 0, int dpi = 203, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, PDFtoZPL.Conversion.BitmapEncodingKind encodingKind = PDFtoZPL.Conversion.BitmapEncodingKind.HexadecimalCompressed, bool graphicFieldOnly = false, bool withAspectRatio = false, bool setLabelLength = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, byte threshold = 128, PDFtoZPL.Conversion.DitheringKind ditheringKind = PDFtoZPL.Conversion.DitheringKind.None, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> string! | ||
static PDFtoZPL.Conversion.ConvertPdfPage(System.IO.Stream! pdfStream, bool leaveOpen, string? password = null, int page = 0, int dpi = 203, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, PDFtoZPL.Conversion.BitmapEncodingKind encodingKind = PDFtoZPL.Conversion.BitmapEncodingKind.HexadecimalCompressed, bool graphicFieldOnly = false, bool withAspectRatio = false, bool setLabelLength = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, byte threshold = 128, PDFtoZPL.Conversion.DitheringKind ditheringKind = PDFtoZPL.Conversion.DitheringKind.None, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> string! | ||
static PDFtoZPL.Conversion.ConvertPdfPage(System.IO.Stream! pdfStream, string? password = null, int page = 0, int dpi = 203, int? width = null, int? height = null, bool withAnnotations = false, bool withFormFill = false, PDFtoZPL.Conversion.BitmapEncodingKind encodingKind = PDFtoZPL.Conversion.BitmapEncodingKind.HexadecimalCompressed, bool graphicFieldOnly = false, bool withAspectRatio = false, bool setLabelLength = false, PDFtoImage.PdfRotation rotation = PDFtoImage.PdfRotation.Rotate0, byte threshold = 128, PDFtoZPL.Conversion.DitheringKind ditheringKind = PDFtoZPL.Conversion.DitheringKind.None, PDFtoImage.PdfAntiAliasing antiAliasing = PDFtoImage.PdfAntiAliasing.All, SkiaSharp.SKColor? backgroundColor = null) -> string! | ||
PDFtoZPL.Conversion.BitmapEncodingKind | ||
PDFtoZPL.Conversion.BitmapEncodingKind.Hexadecimal = 0 -> PDFtoZPL.Conversion.BitmapEncodingKind | ||
PDFtoZPL.Conversion.BitmapEncodingKind.HexadecimalCompressed = 1 -> PDFtoZPL.Conversion.BitmapEncodingKind | ||
PDFtoZPL.Conversion.BitmapEncodingKind.Base64 = 2 -> PDFtoZPL.Conversion.BitmapEncodingKind | ||
PDFtoZPL.Conversion.BitmapEncodingKind.Base64Compressed = 3 -> PDFtoZPL.Conversion.BitmapEncodingKind | ||
PDFtoZPL.Conversion.DitheringKind | ||
PDFtoZPL.Conversion.DitheringKind.Atkinson = 2 -> PDFtoZPL.Conversion.DitheringKind | ||
PDFtoZPL.Conversion.DitheringKind.FloydSteinberg = 1 -> PDFtoZPL.Conversion.DitheringKind | ||
PDFtoZPL.Conversion.DitheringKind.None = 0 -> PDFtoZPL.Conversion.DitheringKind | ||
PDFtoZPL.DitheringKind | ||
PDFtoZPL.DitheringKind.Atkinson = 2 -> PDFtoZPL.DitheringKind | ||
PDFtoZPL.DitheringKind.FloydSteinberg = 1 -> PDFtoZPL.DitheringKind | ||
PDFtoZPL.DitheringKind.None = 0 -> PDFtoZPL.DitheringKind | ||
PDFtoZPL.ZplOptions | ||
PDFtoZPL.ZplOptions.ZplOptions() -> void | ||
PDFtoZPL.ZplOptions.ZplOptions(PDFtoZPL.BitmapEncodingKind EncodingKind = PDFtoZPL.BitmapEncodingKind.HexadecimalCompressed, bool GraphicFieldOnly = false, bool SetLabelLength = false, byte Threshold = 128, PDFtoZPL.DitheringKind DitheringKind = PDFtoZPL.DitheringKind.None) -> void | ||
PDFtoZPL.ZplOptions.DitheringKind.get -> PDFtoZPL.DitheringKind | ||
PDFtoZPL.ZplOptions.DitheringKind.init -> void | ||
PDFtoZPL.ZplOptions.EncodingKind.get -> PDFtoZPL.BitmapEncodingKind | ||
PDFtoZPL.ZplOptions.EncodingKind.init -> void | ||
PDFtoZPL.ZplOptions.GraphicFieldOnly.get -> bool | ||
PDFtoZPL.ZplOptions.GraphicFieldOnly.init -> void | ||
PDFtoZPL.ZplOptions.SetLabelLength.get -> bool | ||
PDFtoZPL.ZplOptions.SetLabelLength.init -> void | ||
PDFtoZPL.ZplOptions.Threshold.get -> byte | ||
PDFtoZPL.ZplOptions.Threshold.init -> void | ||
static PDFtoZPL.Conversion.ConvertBitmap(byte[]! bitmapAsByteArray, PDFtoZPL.ZplOptions zplOptions = default(PDFtoZPL.ZplOptions)) -> string! | ||
static PDFtoZPL.Conversion.ConvertBitmap(SkiaSharp.SKBitmap! bitmap, PDFtoZPL.ZplOptions zplOptions = default(PDFtoZPL.ZplOptions)) -> string! | ||
static PDFtoZPL.Conversion.ConvertBitmap(string! bitmapPath, PDFtoZPL.ZplOptions zplOptions = default(PDFtoZPL.ZplOptions)) -> string! | ||
static PDFtoZPL.Conversion.ConvertBitmap(System.IO.Stream! bitmapAsStream, bool leaveOpen = false, PDFtoZPL.ZplOptions zplOptions = default(PDFtoZPL.ZplOptions)) -> string! | ||
static PDFtoZPL.Conversion.ConvertPdf(byte[]! pdfAsByteArray, string? password = null, PDFtoImage.RenderOptions pdfOptions = default(PDFtoImage.RenderOptions), PDFtoZPL.ZplOptions zplOptions = default(PDFtoZPL.ZplOptions)) -> System.Collections.Generic.IEnumerable<string!>! | ||
static PDFtoZPL.Conversion.ConvertPdf(string! pdfAsBase64String, string? password = null, PDFtoImage.RenderOptions pdfOptions = default(PDFtoImage.RenderOptions), PDFtoZPL.ZplOptions zplOptions = default(PDFtoZPL.ZplOptions)) -> System.Collections.Generic.IEnumerable<string!>! | ||
static PDFtoZPL.Conversion.ConvertPdf(System.IO.Stream! pdfStream, bool leaveOpen = false, string? password = null, PDFtoImage.RenderOptions pdfOptions = default(PDFtoImage.RenderOptions), PDFtoZPL.ZplOptions zplOptions = default(PDFtoZPL.ZplOptions)) -> System.Collections.Generic.IEnumerable<string!>! | ||
static PDFtoZPL.Conversion.ConvertPdfPage(byte[]! pdfAsByteArray, string? password = null, int page = 0, PDFtoImage.RenderOptions pdfOptions = default(PDFtoImage.RenderOptions), PDFtoZPL.ZplOptions zplOptions = default(PDFtoZPL.ZplOptions)) -> string! | ||
static PDFtoZPL.Conversion.ConvertPdfPage(string! pdfAsBase64String, string? password = null, int page = 0, PDFtoImage.RenderOptions pdfOptions = default(PDFtoImage.RenderOptions), PDFtoZPL.ZplOptions zplOptions = default(PDFtoZPL.ZplOptions)) -> string! | ||
static PDFtoZPL.Conversion.ConvertPdfPage(System.IO.Stream! pdfStream, bool leaveOpen = false, string? password = null, int page = 0, PDFtoImage.RenderOptions pdfOptions = default(PDFtoImage.RenderOptions), PDFtoZPL.ZplOptions zplOptions = default(PDFtoZPL.ZplOptions)) -> string! |
Oops, something went wrong.