![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
This module, part of the `abstract_essentials` package, provides a collection of utility functions for working with images and PDFs, including loading and saving images, extracting text from images, capturing screenshots, processing PDFs, and more.
abstract_images
Module - Image and PDF Utilitiesabstract_essentials
PackageGitHub Repository: abstract_essentials
Contact Email: partners@abstractendeavors.com
Date: 08/27/2023
Version: 0.0.0.1
This module, part of the abstract_essentials
package, provides a collection of utility functions for working with images and PDFs, including loading and saving images, extracting text from images, capturing screenshots, processing PDFs, and more.
image_utils.py
The image_utils.py
module contains functions for image-related operations.
pdf_utils.py
The pdf_utils.py
module provides functions for PDF processing.
if_none_return(obj, obj_2)
: Return primary object if secondary object is None
.write_pdf()
: Initialize and return a new PDF writer object.read_pdf(file)
: Read a PDF from a given path and return a PDF reader object.is_pdf_path(file)
: Check if a file path corresponds to a valid PDF file.get_pdf_obj(pdf_obj)
: Process a PDF object or file path and return its content.split_pdf(input_path, output_folder, file_name)
: Split a PDF file into separate pages.pdf_to_img_list(pdf_list, output_folder, file_name, paginate, extension)
: Convert PDF files into images.img_to_txt_list(img_list, output_folder, file_name, paginate, extension)
: Convert images to text using OCR.open_pdf_file(pdf_file_path)
: Open a PDF file using the default system application.image_to_text(image_path)
: Convert an image to text using Tesseract OCR.get_pdfs_in_directory(directory)
: Get a list of PDF filenames in a directory.get_all_pdf_in_directory(file_directory)
: Get full paths of all PDFs in a directory.collate_pdfs(pdf_list, output_pdf_path)
: Merge a list of PDFs into one.To showcase the pdf_utils
module, here's an example combining several utility functions:
from abstract_images.pdf_utils import (
get_file_name, get_directory, mkdirs, split_pdf,
pdf_to_img_list, img_to_txt_list
)
pdf_path = "path_to_pdf"
file_name = get_file_name(pdf_path)
directory = get_directory(pdf_path)
pdf_folder = mkdirs(os.path.join(directory, file_name))
pdf_split_folder = mkdirs(os.path.join(pdf_folder, "split"))
pdf_list = split_pdf(input_path=pdf_path, output_folder=pdf_split_folder, file_name=file_name)
pdf_Image_folder = mkdirs(os.path.join(pdf_folder, "images"))
img_list = pdf_to_img_list(pdf_list=pdf_list, output_folder=pdf_Image_folder, paginate=False, extension="png")
pdf_Text_folder = mkdirs(os.path.join(pdf_folder, "text"))
text_list = img_to_txt_list(img_list=img_list, output_folder=pdf_Text_folder, paginate=False, extension="txt")
For queries, bug reports, or feature requests, please raise an issue on the GitHub repository or contact us through the provided email: partners@abstractendeavors.com. Ensure that you have the required dependencies installed, and for OCR operations, ensure Tesseract is properly set up and its path is correctly specified.
FAQs
This module, part of the `abstract_essentials` package, provides a collection of utility functions for working with images and PDFs, including loading and saving images, extracting text from images, capturing screenshots, processing PDFs, and more.
We found that abstract-images demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.