Home

Awesome

What is PageBot?

PageBot® is a scriptable page layout, vector graphics and typography environment that enables designers to create high quality documents in various print-ready and web-based formats. It is available as a Python library with multi-platform support based on Flat and as a Mac OS X extension that uses DrawBot.

PageBot consists of three abstraction levels:

The official PageBot documentation can be found at pagebot.io.

Installation

Pagebot runs on Python 3. We recommend updating to version 3.7 / 3.8.

System Wide

Cross platform installation:

pip install pagebot

Upgrade to the latest if already installed:

pip install pagebot --upgrade

Virtual Environment

To setup pagebot and its requirements in a virtual environment:

pip install virtualenv
mkdir ~/virtualenvironment
virtualenv ~/virtualenvironment/pagebot
cd ~/virtualenvironment/pagebot/bin
source activate
pip install pagebot

Mac OS X

pip install pagebotosx

See also github.com/PageBot/PageBotOSX.

Usage

from pagebot.document import Document
from pagebot.elements import newRect
from pagebot.conditions import Center2Center, Middle2Middle
from pagebot.toolbox.units import pt
from pagebot.toolbox.color import color

W, H = pt(500, 400)
doc = Document(w=W, h=H, autoPages=1)
page = doc[1]

# Create a new rectangle element with position conditions
newRect(parent=page, fill=color('red'), size=pt(240, 140),
    # Show measure lines on the element.
    showDimensions=True, 
    conditions=[Center2Center(), Middle2Middle()])
# Make the page apply all conditions.
page.solve() 
# Export the document page as png, so it shows as web image.
doc.export('_export/RedSquare.png') 
   

Issue Tracking

Bugs, enhancements and requested features can be added to the GitHub issue tracker:

External Links

Related

Feature Description

Current Functionality

Current features include:

Types of Publications

Unit Testing

PageBot uses Python's native doctest library to perform unit tests:

Note: doctest can be run in Sublime with cmd-B

Future Developments

Licencing

PageBot® is a registered trademark U.S. Serial Number: 87-457,280 Owner: Buro Petr van Blokland + Claudia Mens VOF Docket/Reference Number: 1538-25
}{