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

All Samples(481)  |  Call(481)  |  Derive(0)  |  Import(0)
Sets the font.  If leading not specified, defaults to 1.2 x
font size. Raises a readable exception if an illegal font
is supplied.  Font names are case-sensitive! Keeps track
of font name and size for metrics.

src/d/j/django-admin-report-HEAD/example/lib/reportlab/graphics/renderPDF.py   django-admin-report(Download)
    c = Canvas(fn)
    if msg:
        c.setFont(rl_config.defaultGraphicsFontName, 36)
        c.drawString(80, 750, msg)
    c.setTitle(msg)
    else:
        #show with a title
        c.setFont(rl_config.defaultGraphicsFontName, 12)
        y = 740
        i = 1
def test():
    from reportlab.graphics.shapes import _baseGFontName, _baseGFontNameBI
    c = Canvas('renderPDF.pdf')
    c.setFont(_baseGFontName, 36)
    c.drawString(80, 750, 'Graphics Test')
 
    #print in a loop, with their doc strings
    c.setFont(_baseGFontName, 12)
    y = 740
    i = 1
        # draw a title
        y = y - 30
        c.setFont(_baseGFontNameBI,12)
        c.drawString(80, y, 'Drawing %d' % i)
        c.setFont(_baseGFontName,12)

src/d/j/django-admin-report-HEAD/example/lib/reportlab/pdfbase/pdfform.py   django-admin-report(Download)
    c = canvas.Canvas(fn)
    # first page
    c.setFont("Courier", 10)
    c.drawString(100, 500, "hello world")
    textFieldAbsolute(c, "fieldA", 100, 600, 100, 20, "default value")
    # second page
    c.showPage()
    c.setFont("Helvetica", 7)
    c.translate(50, 20)
    c.drawString(100, 500, "hello world")

src/d/j/django-admin-report-HEAD/example/lib/reportlab/graphics/testshapes.py   django-admin-report(Download)
    pdfPath = os.path.splitext(sys.argv[0])[0] + '.pdf'
    c = Canvas(pdfPath)
    c.setFont(_FONTS[0], 32)
    c.drawString(80, 750, 'ReportLab Graphics-Shapes Test')
 
    # Print drawings in a loop, with their doc strings.
    c.setFont(_FONTS[0], 12)
        # Draw a title.
        y = y - 30
        c.setFont(_FONTS[2],12)
        c.drawString(80, y, '%s (#%d)' % (funcname, i))
        c.setFont(_FONTS[0],12)

src/p/d/pdfgrid-0.2.0/samples/genpdf.py   pdfgrid(Download)
    canv = Canvas(path, pagesize=size)
    for i in range(numPages):
        canv.setFont("Helvetica", size[1]*1.2)
        x, y = size[0]/2.0, size[1]*0.1
        text = u"%s" % i
 
    for i in range(numPages):
        canv.setFont("Helvetica", 500)
        text = u"%s" % i
        if i % 2 == 0:

src/p/d/pdftools.pdfposter-0.6.0/examples/gen-examplepages.py   pdftools.pdfposter(Download)
    step = (long_size - margin*2)/len(numbers)
    canv = Canvas(filename_tall, pagesize=size)
    canv.setFont("Helvetica", 72)
    canv.setStrokeColor(black)
 
    numbers.reverse()
    canv = Canvas(filename_wide, pagesize=size)
    canv.setFont("Helvetica", 72)
    canv.setStrokeColor(black)
 

src/p/d/pdfnup-0.4.1/samples/genpdf.py   pdfnup(Download)
    canv = Canvas(path, pagesize=size)
    for i in range(numPages):
        canv.setFont("Helvetica", size[1]*1.2)
        x, y = size[0]/2.0, size[1]*0.1
        text = u"%s" % i
 
    for i in range(numPages):
        canv.setFont("Helvetica", 500)
        text = u"%s" % i
        if i % 2 == 0:

src/d/j/django-admin-report-HEAD/example/lib/reportlab/pdfbase/cidfonts.py   django-admin-report(Download)
def test():
    # only works if you have cirrect encodings on your box!
    c = Canvas('test_japanese.pdf')
    c.setFont('Helvetica', 30)
    c.drawString(100,700, 'Japanese Font Support')
 
    # the two typefaces
    c.setFont('HeiseiMin-W3-90ms-RKSJ-H', 16)
    # this says "This is HeiseiMincho" in shift-JIS.  Not all our readers
    # have a Japanese PC, so I escaped it. On a Japanese-capable

src/p/y/PyPDF2-1.21/Sample_Code/makesimple.py   PyPDF2(Download)
    c.setStrokeColorRGB(0,0,0)
    c.setFillColorRGB(0,0,0)
    c.setFont("Helvetica", 12 * point) 
    for pn in range(1, np + 1):
        v = 10 * inch

src/d/j/django-admin-report-HEAD/example/lib/reportlab/graphics/barcode/lto.py   django-admin-report(Download)
 
    canvas = Canvas("labels.pdf", pagesize=pagesizes.A4)
    canvas.setFont("Helvetica", 30)
    (width, height) = pagesizes.A4
    canvas.drawCentredString(width/2.0, height-4*cm, "Sample LTO labels")

src/d/j/django-admin-report-HEAD/example/lib/reportlab/lib/codecharts.py   django-admin-report(Download)
def test():
    c = Canvas('codecharts.pdf')
    c.setFont('Helvetica-Bold', 24)
    c.drawString(72, 750, 'Testing code page charts')
    cc1 = SingleByteEncodingChart()

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