Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.2 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    pypostscript 0.1.7

    Download button

    No screenshots available
    Downloads: 92  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Mark Henwood | More programs
    MIT/X Consortium Lic... / FREE
    March 1st, 2012, 18:06 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    pypostscript description

    Create PostScript page using Python objects

    pypostscript is a Python module to create A4 portrait PostScript output with Python objects.

    Usage

    Example of usage:

    from pypostscript.barcode import Code39Barcode, Code93Barcode
    from pypostscript.shapes import Circle, Rectangle
    from pypostscript.text import HelveticaBoldFont, TextLine, TimesPlainFont
    from pypostscript.page import Page


    def sample_page():
     page = Page()
     page.extend(TextLine(x_pts=40,
     y_pts=740,
     font=HelveticaBoldFont(size_pts=22),
     text='A Test Portrait Page'))
     page.extend(TextLine(x_pts=40,
     y_pts=650,
     font=TimesPlainFont(size_pts=12),
     text='PostScript library, test portrait page.'))
     page.extend(Code39Barcode(x_pts=40,
     y_pts=500,
     chars='ABC123'))
     page.extend(Code93Barcode(x_pts=40,
     y_pts=400,
     chars='ABC987'))
     page.extend(Rectangle(x_pts=30,
     y_pts=390,
     width_pts=170,
     height_pts=185,
     line_width_pts=2))
     page.extend(Circle(centre_x_pts=80,
     centre_y_pts=150,
     radius_pts=72,
     line_width_pts=1))
     return page

    if __name__ == '__main__':
     page = sample_page()
     print page.render()



    Product's homepage

    Requirements:

    · Python

      


    TAGS:

    PostScript output | Python library | Python | PostScript | output

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM