Skip to main content

A simple library for creating PDFs in Python. USE: Django,tkinter....

Project description

PDF pdf-Creator-mr

Uma biblioteca simples para criacao de PDFs em Python. A simple library for creating PDFs in Python. Una biblioteca simple para crear PDFs en Python.

Instalação - Install

pip install reportlab



################################English################################
The PDFCreator class facilitates the creation of PDF documents using the ReportLab library in Python.

#Constructor
def __init__(self, filename, width=A4[0], height=A4[1]):
    """
    Initializes a PDFCreator object.

    :param filename: Name of the PDF file to create.
    :param width: Width of the PDF page (default is A4 width).
    :param height: Height of the PDF page (default is A4 height).
    """
Methods
    *add_title(title, fontsize=24, x=None, y=None)
        -Adds a title to the PDF.
    *add_paragraph(text, fontsize=12, spacing=0.5*inch, x=0, y=0)
        -Adds a paragraph of text to the PDF.
    *add_image(image_path, x=inch, y=None, width=2inch, height=2inch)
        -Adds an image to the PDF.
    *add_separator(thickness=1, start_x=inch, y_position=None, width=None)
        -Adds a horizontal separator line to the PDF.
    *add_vertical_line(start_y, end_y, x, thickness=1)
        -Adds a vertical line to the PDF.
    *add_square(width, height, x=inch, y=None)
        -Adds a square or rectangle shape to the PDF.
    *add_multiples_squares(squares, width=None, height=None, x=inch, y=inch)
        -Adds multiple squares or rectangles to the PDF.
    *save()
        -Saves the PDF document.

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

pdf_creator_mr-0.0.3.tar.gz (3.9 kB view details)

Uploaded Source

File details

Details for the file pdf_creator_mr-0.0.3.tar.gz.

File metadata

  • Download URL: pdf_creator_mr-0.0.3.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.7rc1

File hashes

Hashes for pdf_creator_mr-0.0.3.tar.gz
Algorithm Hash digest
SHA256 49f2134b3d0307369f5b2ccb1896e3264f81db1f2b11929d52bad46ebbc5bba9
MD5 abe8b9a6e0767cfda78c1fe2d0a1671c
BLAKE2b-256 79ed7acf4d13d3073ed9173115749b409d870b19da2933ebb4c46ebfdd87913f

See more details on using hashes here.

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