Skip to main content

Este é um script Python que lê e traduz arquivos PDF para texto e áudio usando as bibliotecas PyPDF2, pdfplumber, ### pyttsx3 e googletrans. Ele contém a classe InfoPdf que tem dois métodos: SayThis e Translator.

O método SayThis lê o conteúdo do arquivo PDF especificado e reproduz em áudio usando a biblioteca pyttsx3. Ele usa o pdfplumber para extrair o texto do arquivo PDF e adiciona o número da página em que o texto foi encontrado. Depois disso, usa a biblioteca pyttsx3 para converter o texto em voz.

O método Translator traduz o conteúdo de uma página específica do arquivo PDF para lingua especifica e salva em um arquivo de texto. Ele usa a biblioteca PyPDF2 para abrir o arquivo PDF e extrair o texto da página especificada. Depois disso, usa a biblioteca googletrans para traduzir o texto para o inglês e salva o resultado em um arquivo de texto.

Para usar este script, basta criar um objeto da classe InfoPdf e chamar os métodos SayThis e Translator com os parâmetros necessários. Certifique-se de instalar as bibliotecas necessárias antes de executar o script.

Exemplo de uso:

from DataPdf import arqPdf

pdf = arqPdf.infoPdf()

Ler e reproduzir em áudio o arquivo PDF

pdf.SayThis('meu_arquivo.pdf')

Traduzir a página 3 do arquivo PDF para inglês e salvar em um arquivo de texto

pdf.Translator('meu_arquivo.pdf', 3)

Metadata

Release files for DataPdf 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for DataPdf 0.0.1
File Size Uploaded Provenance
DataPdf-0.0.1.tar.gz 3.5 kB Without provenance Details

Release files / DataPdf-0.0.1.tar.gz

Download URL DataPdf-0.0.1.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
3411c63d4155dddd70bc0f09d67dcd1a4649d9397f5ec1aea99a6af630266807
BLAKE2b-256 checksum
How to use checksums
ac4759f83ea71303c482698b3f2f078a21ae960e439f91641a8c2624806eecad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.5

Security for DataPdf 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.0.1 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page