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.
f = File('path/to/file.pdf')
d = Directory('path/to/save')
pdf_stream = PdfStream()
pdf_stream.add_file_pdf(f)
pdf_stream.to_files_pdf(d) # 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-1.4.1.tar.gz
(24.2 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-1.4.1.tar.gz.
File metadata
- Download URL: convert_stream-1.4.1.tar.gz
- Upload date:
- Size: 24.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
455c12ebfa8208f62f419f676e2cd36e1176ad6c6ec00a8a4176ba9e0d2e83bb
|
|
| MD5 |
4c6a504a8180570241a09aeb3124974c
|
|
| BLAKE2b-256 |
1d02d7b22395d92bace0fd22a21cefeff55c14c41504734d99f155ae03734278
|
File details
Details for the file convert_stream-1.4.1-py3-none-any.whl.
File metadata
- Download URL: convert_stream-1.4.1-py3-none-any.whl
- Upload date:
- Size: 31.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92b4e5eaf65ea73c4ddd3967f7b24c1c73fce3a365e14cc05f388506f7e4d253
|
|
| MD5 |
b77e4f3e2bb80a1aa111199797fdcd74
|
|
| BLAKE2b-256 |
c24ea26a360e0746ddfb4d9d6296f630d4bc35c6fbaea07cb6537658be457351
|