Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(613)  |  Call(361)  |  Derive(13)  |  Import(239)
This class is the programmer's interface to the PDF file format.  Methods
are (or will be) provided here to do just about everything PDF can do.

The underlying model to the canvas concept is that of a graphics state machine
that at any given point in time has a current font, fill color (for figure
interiors), stroke color (for figure borders), line width and geometric transform, among
many other characteristics.

Canvas methods generally either draw something (like canvas.line) using the
current state of the canvas or change some component of the canvas(more...)

src/d/j/django-admin-report-HEAD/example/lib/reportlab/graphics/barcode/lto.py   django-admin-report(Download)
def test() :
    """Test this."""
    from reportlab.pdfgen.canvas import Canvas
    from reportlab.lib import pagesizes
 
    canvas = Canvas("labels.pdf", pagesize=pagesizes.A4)

src/p/d/pdftools.pdfposter-0.6.0/examples/gen-examplepages.py   pdftools.pdfposter(Download)
from reportlab.lib.units import mm
from reportlab.lib.colors import black
from reportlab.pdfgen.canvas import Canvas
 
def genTestFile(filename_tall, filename_wide):
    size = (short_size, long_size)
    step = (long_size - margin*2)/len(numbers)
    canv = Canvas(filename_tall, pagesize=size)
    canv.setFont("Helvetica", 72)
    canv.setStrokeColor(black)
    step = (long_size - margin*2)/len(numbers)
    numbers.reverse()
    canv = Canvas(filename_wide, pagesize=size)
    canv.setFont("Helvetica", 72)
    canv.setStrokeColor(black)

src/p/d/pdfrw-0.1/examples/rl2/copy.py   pdfrw(Download)
import os
 
from reportlab.pdfgen.canvas import Canvas
 
from decodegraphics import parsepage
outfn = 'copy.' + os.path.basename(inpfn)
pages = PdfReader(inpfn).pages
canvas = Canvas(outfn, pageCompression=0)
 
for page in pages:

src/d/j/django-admin-report-HEAD/example/lib/reportlab/lib/pdfencrypt.py   django-admin-report(Download)
import tempfile
 
from reportlab.pdfgen.canvas import Canvas
from reportlab.pdfbase import pdfutils
from reportlab.platypus.flowables import Flowable
    #now make a new PDF document
    buf = getStringIO()
    canv = Canvas(buf, pagesize=firstPageSize)
 
    # set a standard ID while debugging

src/p/d/pdfgrid-0.2.0/samples/genpdf.py   pdfgrid(Download)
from reportlab.lib.colors import black, white, pink, lightblue
from reportlab.lib.pagesizes import A4, legal, landscape
from reportlab.pdfgen.canvas import Canvas
 
 
def genTestFile(path, numPages):
    "Generate a PDF doc with *very* big page numbers on all pages."
 
    size = landscape(A4)
    canv = Canvas(path, pagesize=size)
    if orientation == "landscape":
        pageSize = landscape(pageSize)
    canv = Canvas(outPath, pagesize=pageSize)
 
    for i in range(numPages):

src/p/d/pdfnup-0.4.1/samples/genpdf.py   pdfnup(Download)
from reportlab.lib.colors import black, white, pink, lightblue
from reportlab.lib.pagesizes import A4, legal, landscape
from reportlab.pdfgen.canvas import Canvas
 
 
def genTestFile(path, numPages):
    "Generate a PDF doc with *very* big page numbers on all pages."
 
    size = landscape(A4)
    canv = Canvas(path, pagesize=size)
    if orientation == "landscape":
        pageSize = landscape(pageSize)
    canv = Canvas(outPath, pagesize=pageSize)
 
    for i in range(numPages):

src/p/d/pdfsplit-0.4.2/samples/genpdf.py   pdfsplit(Download)
 
from reportlab.lib.pagesizes import A4, landscape
from reportlab.pdfgen.canvas import Canvas
 
 
def genTestFile(path, numPages):
    "Generate a PDF doc with *very* big page numbers on all pages."
 
    size = landscape(A4)
    canv = Canvas(path, pagesize=size)

src/p/y/PyPDF2-1.21/Sample_Code/makesimple.py   PyPDF2(Download)
def make_pdf_file(output_filename, np):
    title = output_filename
    c = canvas.Canvas(output_filename, pagesize=(8.5 * inch, 11 * inch))
    c.setStrokeColorRGB(0,0,0)
    c.setFillColorRGB(0,0,0)

src/p/o/PollyReports-HEAD/docs/sample03.py   PollyReports(Download)
from reportlab.pdfgen.canvas import Canvas
from PollyReports import *
from testdata import data
 
rpt = Report(data)
])
 
canvas = Canvas("sample03.pdf", (72*11, 72*8.5))
rpt.generate(canvas)
canvas.save()

src/p/o/PollyReports-HEAD/docs/sample02.py   PollyReports(Download)
from reportlab.pdfgen.canvas import Canvas
from PollyReports import *
from testdata import data
 
rpt = Report(data)
])
 
canvas = Canvas("sample02.pdf", (72*11, 72*8.5))
rpt.generate(canvas)
canvas.save()

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next