https://github.com/sungaila/pdftozpl
A .NET library to convert PDF files (and bitmaps) into Zebra Programming Language code.
https://github.com/sungaila/pdftozpl
bitmap bitmap-images csharp dotnet dotnet-core dotnetframework dotnetstandard pdf pdfium zebra-programming-language zpl
Last synced: 2 months ago
JSON representation
A .NET library to convert PDF files (and bitmaps) into Zebra Programming Language code.
- Host: GitHub
- URL: https://github.com/sungaila/pdftozpl
- Owner: sungaila
- License: mit
- Created: 2020-02-06T18:38:36.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-03-14T18:01:25.000Z (over 1 year ago)
- Last Synced: 2024-03-15T16:59:31.409Z (over 1 year ago)
- Topics: bitmap, bitmap-images, csharp, dotnet, dotnet-core, dotnetframework, dotnetstandard, pdf, pdfium, zebra-programming-language, zpl
- Language: C#
- Homepage: https://www.sungaila.de/PDFtoZPL/
- Size: 40.9 MB
- Stars: 54
- Watchers: 5
- Forks: 10
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
#  PDFtoZPL
[](https://github.com/sungaila/PDFtoZPL/actions/workflows/dotnet.yml)
[](https://github.com/sungaila/PDFtoZPL/actions/workflows/dotnet.yml)
[](https://sonarcloud.io/project/overview?id=sungaila_PDFtoZPL)
[](https://www.nuget.org/packages/PDFtoZPL/)
[](https://www.nuget.org/packages/PDFtoZPL/)
[](https://www.sungaila.de/PDFtoZPL/)
[](https://github.com/sungaila/PDFtoZPL/blob/master/LICENSE)A .NET library to convert [PDF files](https://en.wikipedia.org/wiki/PDF) (and bitmaps) into [Zebra Programming Language commands](https://en.wikipedia.org/wiki/Zebra_(programming_language)).
This .NET library is built on top of
* [PDFium](https://pdfium.googlesource.com/pdfium/) (native PDF renderer)
* [SkiaSharp](https://github.com/mono/SkiaSharp) (cross-platform 2D graphics API)## Getting started
Just call one of the following static methods:
* `PDFtoZPL.Conversion.ConvertPdfPage()`
* `PDFtoZPL.Conversion.ConvertPdf()`
* `PDFtoZPL.Conversion.ConvertPdfAsync()`
* `PDFtoZPL.Conversion.ConvertBitmap()`### How does it work?
0. Use PDFium to render a bitmap (for PDF files)
1. Make the bitmap monochrome
2. Convert the bitmap into a ^GF (Graphic Field) command
3. Compress the command hexdecimal data to shrink the ZPL code in size
4. Return the generated ZPL code