Commit Graph

74 Commits

Author SHA1 Message Date
Patrick Kanzler 36debff72c
FIX abstractbaseclass in Escpos not properly loaded
* fixes #126
* adds a test to verify the patch
* uses a helperfunction of six in order to properly load ABCMeta in Python 2 and 3
2016-04-03 22:36:57 +02:00
Patrick Kanzler 2aa0878f54 Merge pull request #123 from python-escpos/refactor/misc-issues
Refactor misc issues
2016-04-03 21:46:15 +02:00
Michael Billington f39c4227ec Implement printer-side rendering of QR codes for printers that support it.
Expand settings on escpos.qr to include ec, size,
model and 'native' (send image or send esc/pos QR command).

Default is set as native=False, so existing code will continue to
render QR codes as images.
2016-04-03 13:55:52 +10:00
Patrick Kanzler 481285625b
REFACTOR simplify out-of-bounds-check in control() 2016-04-02 16:02:04 +02:00
Patrick Kanzler f6e0edc7c7
REFACTOR variables to be lower case 2016-04-02 15:26:00 +02:00
Cody a236ccebe9 Migrated `%` string formating 2016-04-01 19:19:38 +00:00
Patrick Kanzler f5a7d681eb DOC add warning to the new functions in the image-API
This part is still in flux and one should not yet rely on it.
2016-04-01 20:59:27 +02:00
Davis Goglin 14ae1a7d89 Fix python3 barcode type b length encoding 2016-03-28 09:58:42 -07:00
Patrick Kanzler 309866f8c9 Merge pull request #111 from mike42/feature/python3.5-support
Clean up non-float value, add v3.5 to tox test
2016-03-19 12:51:03 +01:00
Michael Billington 8b454c4765 Clean up non-float value, add v3.5 to tox test 2016-03-17 21:59:47 +11:00
Patrick Kanzler f76db4e0d4
HOTFIX bracode: use proper NUL character instead of unicode-string 2016-03-16 23:23:42 +01:00
Patrick Kanzler 80f6200915
FEATURE disable panel buttons 2016-03-10 16:01:35 +01:00
Patrick Kanzler 205728f5be DOC fix todo block in cut() 2016-03-09 16:36:40 +01:00
Christoph Heuel 75252a3797 direct_image throws TypeError
* The _raw method accepts only byte strings
2016-03-08 20:07:16 +01:00
Patrick Kanzler 4c406c1775 FIX fullimage so that it at least creates output 2016-03-08 20:07:16 +01:00
Patrick Kanzler c9ea90cd82 FIX all calls of _raw(), (except in images) in escpos
bytes should now be used in all but the image functions reliably
2016-03-08 20:07:16 +01:00
Patrick Kanzler 5d5412ba73 REFACTOR use bytes in constants-section
adds six for cross-version int/byte-conversion
2016-03-08 20:07:16 +01:00
Patrick Kanzler 7005ba5899 DOC change type of msg for _raw to bytes 2016-03-08 20:07:16 +01:00
Patrick Kanzler 18518fa901 semiFIX image-printing (still broken) 2016-03-08 20:07:16 +01:00
Patrick Kanzler 5a03f0fc7c DOC improve docstring of direct_image 2016-03-08 20:07:16 +01:00
Davis Goglin 9d12c7faab Add missing .upper() for function type 2016-03-08 09:17:47 -08:00
Davis Goglin 250455ae23 Add null terminator when printing barcode of type A, issue #58 2016-03-07 16:20:04 -08:00
davisgoglin 5c49e0103c Update barcode printing to allow for barcode function type B 2016-03-06 20:06:05 -08:00
Dean Rispin 870144aac6 Simplify variable checking on width and height values 2016-03-01 16:34:21 -08:00
Dean Rispin e48755f7d0 Add error checking on width and height fields: 2016-03-01 16:25:38 -08:00
Dean Rispin 8d00e63b87 Add width/height multiplier support, upsidedown text and text smoothing 2016-03-01 10:05:52 -08:00
Dean Rispin 7c98de6727 ADD inverted printing to set method 2016-02-29 20:56:45 +01:00
Patrick Kanzler 0c56f5c831 DOC improve docstring in barcode-method 2016-01-14 15:50:58 +01:00
Patrick Kanzler 248ddf8456 IMPROVE barcode printing
* adds default values to the auxiliary parameters
* allows to suppress the centered alignment
2016-01-14 14:51:26 +01:00
Patrick Kanzler 713380baf9 DOC corrected todo in barcode-method 2016-01-14 14:04:35 +01:00
Patrick Kanzler cd2da59fc2 FIX and review barcode-printing 2016-01-14 01:00:53 +01:00
Patrick Kanzler 939e66834e DOC elaborate on partial cut
closes #44
2016-01-13 16:06:18 +01:00
Patrick Kanzler 41c6afd3b8 REFACTOR replace % op with format were it is easy 2016-01-08 03:43:33 +01:00
Patrick Kanzler f25521f22f REFACTOR fix minor PEP8 and similar mistakes 2016-01-08 03:34:14 +01:00
Stephan Sokolow 0e907644d9 Allow bandsize to be varied in fullimage() 2016-01-08 02:46:21 +01:00
Stephan Sokolow a6ec674828 Allow bypassing the resizing and height-cropping steps in fullimage() 2016-01-08 02:46:21 +01:00
Thomas van den Berg 598c893943 add function to print full images including resizing and fix band printing 2016-01-08 02:46:21 +01:00
Nathan Bookham 1614298863 Adjusted QR error correction
Maxed out the error correction on QR code generation for vastly improved recognition. The trade-off is that the amount of bytes that can be stored are reduced.
2016-01-08 02:46:21 +01:00
Stephan Sokolow 3e89a10bed Accept "CODABAR" as an alias for "NW7" in barcode() 2016-01-08 02:46:21 +01:00
Stephan Sokolow e988873999 Make BarcodeSizeError and BarcodeTypeError display the erroneous value
(MUCH more helpful for debugging)
2016-01-08 02:46:21 +01:00
Stephan Sokolow f7a2caee72 Actually use the barcode height and width parameters
(And reverse their order in the method signature so corrections to the
range checks don't break existing code)

check whether this is the solution for #26
2016-01-08 02:46:21 +01:00
Patrick Kanzler e88a19ef2d DOC correct mistake in documentation 2016-01-06 12:02:30 +01:00
Patrick Kanzler 8b8ca76af6 DOC improve the documentation
* make API-doc more legible
* improve comments in methods
2016-01-05 23:14:35 +01:00
Christoph Heuel aa4ffdd21b Merge branch 'fix/break_output_after_image' 2015-12-13 14:18:44 +01:00
Christoph Heuel 06f2e1e731 Merge remote-tracking branch 'faulab/refactoring-and-documentation' 2015-12-12 18:11:58 +01:00
Christoph Heuel 577de10cb4 Merge remote-tracking branch 'faulab/fix-pc1252' 2015-12-12 17:10:05 +01:00
Patrick Kanzler 0dacc35d94 DOC, IMPROVE improve docstrings and add abstract method _raw to Escpos 2015-11-27 23:13:48 +01:00
Patrick Kanzler ef8035527c REFACTOR do not shadow built-ins 2015-11-27 23:13:48 +01:00
Patrick Kanzler 07d8e073ae REFACTOR style and PEP8, fixes #66 2015-11-27 23:13:35 +01:00
Patrick Kanzler 096445631f REFACTOR use new-style class for Escpos 2015-11-27 23:13:35 +01:00