A C library for controlling MUNBYN ITPP047 thermal printers, providing comprehensive support for text formatting, barcode printing, and character set management.
- Text Formatting: Font sizes, styles, alignment, rotation
- Barcode Support: Multiple barcode types (Code128, EAN, QR codes, etc.)
- Character Sets: Support for multiple codepages and character encodings
- Cross-Platform: Works on Linux, macOS, and Windows
- Simple API: Easy-to-use functions for common printing tasks
- ITPP047 Optimized: Specifically designed for MUNBYN ITPP047 thermal printer model
munbync/
├── src/ # Source code
│ ├── munbyn_printer.c # Main library implementation
│ └── munbyn_printer.h # Library header file
├── examples/ # Example programs
│ ├── example.c # Basic usage example
│ ├── barcode_example.c # Barcode printing examples
│ ├── text_formatting_example.c # Text formatting examples
│ └── ... # Other examples
├── docs/ # Documentation
│ ├── BARCODE_COMMANDS.md # Barcode command reference
│ ├── TEXT_FORMATTING_COMMANDS.md # Text formatting reference
│ └── ... # Other documentation
├── build/ # Build outputs (auto-generated)
│ ├── lib/ # Libraries (.a, .so files)
│ ├── examples/ # Example executables
│ └── obj/ # Object files
├── Makefile # Build configuration
└── README.md # This file
- GCC compiler
- Make
- Standard C library
# Build everything (library + examples)
make all
# Build only the static library
make library
# Build only the shared library
make shared
# Build only example programs
make examples
# Clean build files
make clean
# Show all available targets
make help- Libraries:
build/lib/libmunbyn.a(static),build/lib/libmunbyn.so(shared) - Examples:
build/examples/directory contains all example executables
# Install system-wide
sudo make install
# Uninstall
sudo make uninstall#include "munbyn_printer.h"
int main() {
// Open MUNBYN ITPP047 printer connection
MunbynPrinter printer = munbyn_open("/dev/ttyUSB0", 9600);
if (!printer) {
printf("Failed to open MUNBYN ITPP047 printer\n");
return 1;
}
// Print some text
munbyn_print_text(printer, "Hello, World!\n");
// Print a barcode
munbyn_print_barcode_code128(printer, "1234567890", 50, 2, 1);
// Feed and cut
munbyn_feed_lines(printer, 3);
munbyn_cut_paper(printer);
// Close connection
munbyn_close(printer);
return 0;
}After installation:
gcc -o myprogram myprogram.c -lmunbynOr if using the library locally:
gcc -Isrc -o myprogram myprogram.c -Lbuild/lib -lmunbynThe examples/ directory contains several demonstration programs:
example.c: Basic printing and barcode operationstext_formatting_example.c: Text styling, fonts, and alignmentbarcode_example.c: Various barcode types and configurationscharset_example.c: Character set and codepage examplesfeed_test.c: Paper feeding and cutting operations
Run the examples:
make examples
./build/examples/example
./build/examples/barcode_example
# etc.Detailed command references are available in the docs/ directory:
docs/TEXT_FORMATTING_COMMANDS.md- Text styling and formattingdocs/BARCODE_COMMANDS.md- Barcode printing commandsdocs/CHARSET_COMMANDS.md- Character set handlingdocs/ITPP047 Program Manual-1.00.pdf- Official MUNBYN ITPP047 programming manual
This project is open source. Please refer to the LICENSE file for details.
Contributions are welcome! Please feel free to submit issues and pull requests.