Skip to main content

A package for making print scripts

Project description

PrintScript

Write less, do more

import PrintScript.zpl as ZPL

# specify your image file path
imagePath = "/path/to/your/image.png"

with open("example.zpl", "wb") as file:

    # create a script generator
    generator = ZPL.Generator()

    # set parameters
    generator.setPrintWidth(576) \
             .setLabelLength(800) \
             .setLabelShift(0) \
             .setLabelHomePosition((0, 0)) \
             .addGraphicField((0, 0), (576, -1), imagePath)

    # generate the script
    script = generator.makeScript()

    # write it to the file
    file.write(script)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

PrintScript-1.3.0.tar.gz (7.3 kB view hashes)

Uploaded Source

Built Distribution

PrintScript-1.3.0-py3-none-any.whl (8.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page