Manipulação de documentos PDF e Imagens. Converter, Ler, rotacionar exportar etc.
Project description
Configuração instalação:
pip3 install -r requirements.txt
Uso dividir páginas de um arquivo PDF:
>>> from file import File, Directory
>>> from pdflib import PdfStream
# instâncie o caminho do arquivo PDF e o diretório para exportar os dados.
file_pdf = File('path/to/file.pdf')
output_dir = Directory('path/to/save')
pdf_stream = PdfStream()
pdf_stream.add_file_pdf(file_pdf)
pdf_stream.to_files_pdf(output_dir) # isso irá converter cada página em um arquivo PDF
Uso para unir vários arquivos PDF.
>>> from file import File, Directory
>>> from pdflib import PdfStream
# instâncie o caminho dos arquivos PDF que deseja unir.
f = File('path/to/file.pdf')
f2 = File('path/to/file2.pdf)
...
... # Adicione quantos arquivos desejar.
pdf_stream = PdfStream()
pdf_stream.add_file_pdf(f)
pdf_stream.add_file_pdf(f2)
pdf_stream.to_file_pdf(File('path/to/new_file.pdf'))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
convert_stream-2.3.3.tar.gz
(29.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file convert_stream-2.3.3.tar.gz.
File metadata
- Download URL: convert_stream-2.3.3.tar.gz
- Upload date:
- Size: 29.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
14e7eaf9f087df4449c60015c2da73fe7c9812b77d44175b82a656926709af18
|
|
| MD5 |
eab536dd9ab301f19b0e3f4ed4f6a5d4
|
|
| BLAKE2b-256 |
2a3ec00f7b02b35c68157b29426e0637a7bca6fbb304e6b4f57d8c597ffdb1a4
|
File details
Details for the file convert_stream-2.3.3-py3-none-any.whl.
File metadata
- Download URL: convert_stream-2.3.3-py3-none-any.whl
- Upload date:
- Size: 37.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
699bcc7e5cf95e408cdf11c0d44ac733e9a3b0278d3faa450768ae28bfaea9d6
|
|
| MD5 |
400cae22caa9c7872b8af300627e837f
|
|
| BLAKE2b-256 |
dbd7e1f73f066c2a7529bae11c1dcce2335aaeb4e2df64c8614ad25046914f9f
|