Skip to main content

Um script Python que le e traduz arquivos PDF para texto e audio usando as bibliotecas PyPDF2, pdfplumber, ### pyttsx3 e googletrans. Ele contém a classe InfoPdf que tem dois metodos: SayThis e Translator.

O método SayThis lê o conteúdo do arquivo PDF especificado e reproduz em audio 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 metodo Translator traduz o conteúdo de uma página especifica 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 PdfFileM import infoPdf

pdf = infoPdf.infoPdf()

Ler e reproduzir em audio o arquivo PDF

0 ou 1 indica o que fazer, onde 0 ler uma pagina especifica e 1 a leitura do arquivo todo

pdf.SayThis(nome_pdf (string), 0 ou 1 (int), numero da pagina (int))

Traduzir a pagina, informando numero da pagina e a lingua que deseja traduzir

pdf.Translator(nome_pdf (string), pagina (int), lingua(string))

Metadata

Release files for PdfFileM 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 PdfFileM 0.0.1
File Size Uploaded Provenance
PdfFileM-0.0.1.tar.gz 3.4 kB Without provenance Details

Release files / PdfFileM-0.0.1.tar.gz

Download URL PdfFileM-0.0.1.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
7e4c9b541cd101b95105eb73cfc8aa45195f5a753742c6279c57aea84dbeada9
BLAKE2b-256 checksum
How to use checksums
b0629d7167055c4c1ada3659c5d259db166ce2b284e3b52f63d5ed4418b3c89a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.5

Security for PdfFileM 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