Package: look-like-scanned
look-like-scannedPython script to make documents look like they were scanned.Local, Private, Secure, Open-Source and Transparent!Converts every page of a given PDF file into an image-based page and applies random askew and brightness (very mild) effects to simulate the appearance of scanned documents.The resulting pages are then combined back into an Output PDF file.There are options to combine / convert image files into PDF as well.Output PDF files are saved in the same folder with a suffix"File_Name_output.pdf"InstallationInstall from thePython Package Index (PyPI)pipinstalllook-like-scannedOr to install latest version from GitHubgitclonehttps://github.com/navchandar/look-like-scanned.gitcdlook-like-scanned
pipinstallpoetry
poetryinstall
pipinstall.Verify Installation:# Print help message and usage options availablescanner-hUsageThis package usesPILandpypdfium2to convert and manipulate image and pdf objects.This is extended to provide a command-line interface (CLI) for easy usage.# Convert all pdf files in folder to scanned pdfscanner-i.\tests
scanner-i.\tests-f"pdf"# Convert all pdf files in folder to scanned without askewscanner-i.\tests-ano# Convert specific pdf file in folder to scanned pdfscanner-i.\tests-f"test.pdf"# Convert all jpg, jpeg, png, webp files in folder to one pdf filescanner-i.\tests-f"image"# Convert all image files in folder in the order of file namesscanner-i.\tests-f"image"-s"name"# Convert all png files in folder to pdf with 100% quality to one pdf filescanner-i.\tests-f"png"-q100# Convert specific jpg file in folder to pdf with 75% quality to one pdf filescanner-i.\tests-f"JPG_Test.jpg"-q75# Convert all PDF files including sub foldersscanner-i.\tests-f"pdf"-ryes# Convert all Images including sub folders into one PDFscanner-i.\tests-f"image"-ryes# Convert all PDF files including sub folders and save in black & white formatscanner-i.\tests-f"pdf"-ryes-byesArgumentsThese are the command-line arguments accepted:-i, --input_folder: Specifies the input folder to read files from and convert. The default value is the current directory.Example:-i /path/to/filesor-i C:\files\documents-f, --file_type_or_name: Specifies the file types to process or the file name to convert. The default value is "pdf" to convert all pdf files in the given input folder.Example:-f pdfor-f image.jpgor-f image-q, --file_quality: Specifies the quality of the converted output files. The value must be between 50 and 100. The default value is 95.Example:-q 90-a, --askew: Controls whether to make the output documents slightly askew or slightly tilted. Accepted values are "yes" or "no". The default value is "yes".Example:-a yesor--askew no-b, --black_and_white: Controls whether to save output documents in black and white format (to make it look like a photocopy) . Accepted values are "yes" or "no". The default value is "no".Example:-b yesor--black_and_white no-r, --recurse: Allows scripts to find all matching files including subdirectories. Accepted values are "yes" or "no". The default value is "yes".Example:-r yesor--recurse no-s, --sort_by: Allows scripts to sort the files based on name, creation time or modified time. Accepted values are "name", "ctime", "mtime", "none". The default value is "name". If "none" is selected, then the default order of files returned by the OS is used for document conversion.Example:-s nameor--sort_by none❗❗Note:❗❗The supported file types are: ".jpg", ".png", ".jpeg", ".webp", ".pdf".The output PDF file sizewill be biggerthan the input file because the pages are stored in image format.Bookmarks / Links / Metadata will be removed when saving the output file.Transparency will be removed from png files when converting to pdf.Password protected PDF files are not yet supported.Youtube: How to Insert a Signature on a PDF FileLicenseMIT licenseSupport This Project