This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """ | |
| Extract annotated pages from PDF files. | |
| This script reads one or more PDF files, checks each page for annotations, | |
| and writes a new PDF containing only those pages that contain annotations. | |
| If an output filename is not provided, the script uses the input file's basename | |
| but adds "_extracted" before the ".pdf" extension. | |
| Before overwriting an existing file, the user is prompted for confirmation. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """ | |
| Merge image files into a single PDF, optionally annotating images with their filenames using ImageMagick. | |
| The grid layout is controlled by the number of rows and columns. | |
| Use the --with-text flag to enable filename annotation (default is without text). | |
| You can adjust the annotation font size by using the --font-scale option. | |
| """ | |
| import argparse | |
| import os |
OlderNewer