Skip to main content

Uma biblioteca Python para converter arquivos PDF em imagens.

Project description

📚 PDF to Image Converter

🚀 pdf_to_img_converter é uma biblioteca Python para converter arquivos PDF em imagens PNG. Suporta entrada de arquivos locais e URLs, além de oferecer a opção de remover automaticamente as imagens geradas.


Funcionalidades

  • 📄 Conversão de PDF para imagens.
  • 🌐 Suporte a arquivos locais e URLs.
  • 🗑 Função para excluir as imagens após o uso.

Instalação

Instale o pacote diretamente do PyPI:

pip install pdf_to_img_converter

Requisitos: pdf2image, requests e Pillow (instalados automaticamente).


💡 Como Usar

📄 Converter um PDF local para imagens

from pdf_to_img_converter.converter import convert_pdf_to_image

image_paths = convert_pdf_to_image("documento.pdf")
print("Imagens geradas:", image_paths)

for img in image_paths:
    print(img)

🌐 Converter um PDF a partir de uma URL

image_paths = convert_pdf_to_image("https://www.exemplo.com/arquivo.pdf")
print("Imagens geradas:", image_paths)

for img in image_paths:
    print(img)

🗑 Excluir imagens geradas após o uso

from pdf_to_img_converter.converter import delete_images

delete_images(image_paths)
print("Imagens excluídas com sucesso!")

🧪 Executando Testes

Para rodar os testes unitários:

pytest tests/

🏗 Estrutura do Projeto

pdf_to_img_converter/
│
├── pdf_to_img_converter/       # 📦 Código da biblioteca
│   ├── __init__.py
│   ├── converter.py            # 🔥 Funções principais
│
├── tests/                      # 🧪 Testes unitários
│   ├── test_converter.py
│
├── test_files/
│
├── setup.py                    # ⚙️ Configuração do pacote
├── pyproject.toml              # 📦 Configuração moderna
├── README.md                   # 📚 Documentação do pacote
├── LICENSE                     # 📜 Licença MIT
└── MANIFEST.in                 # 📋 Inclusão de arquivos extras

📝 Licença

Distribuído sob a Licença MIT. Veja o arquivo LICENSE para mais informações.


👨‍💻 Autor

Desenvolvido por Roberto Lima 🚀✨


💬 Contato


Gostou do projeto?

Deixe uma ⭐ no repositório e compartilhe com a comunidade! 🚀✨

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_to_img_converter-0.1.0.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pdf_to_img_converter-0.1.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file pdf_to_img_converter-0.1.0.tar.gz.

File metadata

  • Download URL: pdf_to_img_converter-0.1.0.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pdf_to_img_converter-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f415e8574107ee5745fc7bab0bbbc2511f204c1c1e3e58ff62d473a8b871a859
MD5 85b9f22752fe65489fbe28c849ad6188
BLAKE2b-256 b75bb42368ab6efff428ffe7e38a99f375464ce0763172ad0c0c423b6bcccb23

See more details on using hashes here.

File details

Details for the file pdf_to_img_converter-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pdf_to_img_converter-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3a2c9e3beef5fa0d31eb0459daa275d7a6fe48bf73dc16d10eb2ad0b9672536d
MD5 23eae9c4195414fc818ac7790a1fd7d2
BLAKE2b-256 84f5d927153cc002433e27c63977d3c2c80a86e4bbb8d65cf1d41281ed825a66

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page