بنقرة واحدة
pdf-tools
Apply when converting, processing, or analyzing PDF files
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Apply when converting, processing, or analyzing PDF files
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
| name | pdf-tools |
| description | Apply when converting, processing, or analyzing PDF files |
Rules and usage for PDF tools in [WORKSPACE_FOLDER]/../.tools/.
../.tools/_pdf_to_jpg_converted/[PDF_FILENAME]/DevSystemV2/skills/pdf-tools/convert-pdf-to-jpg.pyConverts PDF pages to JPG images for vision analysis.
Usage:
python DevSystemV2/skills/pdf-tools/convert-pdf-to-jpg.py <input.pdf> [--output <dir>] [--dpi <dpi>] [--pages <range>]
Examples:
python DevSystemV2/skills/pdf-tools/convert-pdf-to-jpg.py invoice.pdf
python DevSystemV2/skills/pdf-tools/convert-pdf-to-jpg.py invoice.pdf --dpi 200 --pages 1-2
python DevSystemV2/skills/pdf-tools/convert-pdf-to-jpg.py invoice.pdf --pages 1
Output Convention:
../.tools/_pdf_to_jpg_converted/[PDF_FILENAME]/[PDF_FILENAME]_page001.jpg, [PDF_FILENAME]_page002.jpg, etc.Parameters:
--output: Output directory (default: ../.tools/_pdf_to_jpg_converted/)--dpi: Resolution (default: 120)--pages: Page range - "1", "1-3", or "all" (default: all)Location: ../.tools/7z/
7-Zip is required to extract Ghostscript from its NSIS installer. The standalone 7za.exe cannot extract NSIS archives.
& "../.tools/7z/7z.exe" x -y -o"output_folder" "archive.zip"
& "../.tools/7z/7z.exe" x -y -o"output_folder" "installer.exe"
& "../.tools/7z/7z.exe" l "archive.zip"
Location: ../.tools/poppler/Library/bin/
& "../.tools/poppler/Library/bin/pdftoppm.exe" -jpeg -r 150 "input.pdf" "output_prefix"
& "../.tools/poppler/Library/bin/pdftotext.exe" "input.pdf" "output.txt"
& "../.tools/poppler/Library/bin/pdfinfo.exe" "input.pdf"
& "../.tools/poppler/Library/bin/pdfseparate.exe" "input.pdf" "output_%d.pdf"
& "../.tools/poppler/Library/bin/pdfunite.exe" "page1.pdf" "page2.pdf" "merged.pdf"
Location: ../.tools/qpdf/bin/
& "../.tools/qpdf/bin/qpdf.exe" --empty --pages file1.pdf file2.pdf -- merged.pdf
& "../.tools/qpdf/bin/qpdf.exe" input.pdf --pages . 1-5 -- output.pdf
& "../.tools/qpdf/bin/qpdf.exe" --decrypt --password=secret encrypted.pdf decrypted.pdf
& "../.tools/qpdf/bin/qpdf.exe" --replace-input damaged.pdf
& "../.tools/qpdf/bin/qpdf.exe" --linearize input.pdf output.pdf
DevSystemV2/skills/pdf-tools/compress-pdf.pyIntelligent PDF compression that analyzes content and applies optimal strategy.
Usage:
python DevSystemV2/skills/pdf-tools/compress-pdf.py <input.pdf> [--compression high|medium|low] [--output output.pdf]
Examples:
python DevSystemV2/skills/pdf-tools/compress-pdf.py report.pdf
python DevSystemV2/skills/pdf-tools/compress-pdf.py report.pdf --compression high
python DevSystemV2/skills/pdf-tools/compress-pdf.py report.pdf --compression low --output archive.pdf
Compression levels:
Features:
Output: ../.tools/_pdf_output/[PDF_FILENAME]_compressed.pdf
DevSystemV2/skills/pdf-tools/downsize-pdf-images.pyDirect Ghostscript wrapper for manual DPI control.
Usage:
python DevSystemV2/skills/pdf-tools/downsize-pdf-images.py <input.pdf> [--output <dir>] [--dpi <dpi>] [--preset <preset>]
Parameters:
--output: Output directory (default: ../.tools/_pdf_output/)--dpi: Resolution (default: 150)--preset: Quality preset - screen (72), ebook (150), printer (300), prepress (300)Output: ../.tools/_pdf_output/[PDF_FILENAME]_[DPI]dpi.pdf
Location: ../.tools/gs/bin/
& "../.tools/gs/bin/gswin64c.exe" -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dDownsampleColorImages=true -dColorImageResolution=72 -dDownsampleGrayImages=true -dGrayImageResolution=72 -dDownsampleMonoImages=true -dMonoImageResolution=72 -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf
-dPDFSETTINGS)/screen - 72 DPI, smallest file size/ebook - 150 DPI, medium quality/printer - 300 DPI, high quality/prepress - 300 DPI, color preserving& "../.tools/gs/bin/gswin64c.exe" -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dFILTERIMAGE=true -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf
Two-pass workflow for maximum compression:
& "../.tools/gs/bin/gswin64c.exe" -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dDownsampleColorImages=true -dColorImageResolution=72 -dDownsampleGrayImages=true -dGrayImageResolution=72 -dNOPAUSE -dQUIET -dBATCH -sOutputFile=temp.pdf input.pdf
& "../.tools/qpdf/bin/qpdf.exe" --linearize --object-streams=generate --stream-data=compress --compress-streams=y --optimize-images --flatten-annotations=screen temp.pdf output.pdf
Remove-Item temp.pdf
Before optimizing, analyze the PDF to understand what's consuming space.
& "../.tools/poppler/Library/bin/pdfinfo.exe" "input.pdf"
& "../.tools/poppler/Library/bin/pdfimages.exe" -list "input.pdf"
Shows: page, dimensions, color space, compression, DPI, size. Use to determine if images can be further compressed.
& "../.tools/poppler/Library/bin/pdfimages.exe" -list "input.pdf" | Measure-Object
Tested on 6 real-world annual reports (50-100 MB each):
High compression (>50% reduction):
Moderate compression (10-50%):
Low compression (<10%):
Key factors affecting compression:
cmd /c "& '../.tools/gs/bin/gswin64c.exe' -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dDetectDuplicateImages=true -dCompressFonts=true -dSubsetFonts=true -dConvertCMYKImagesToRGB=true -dColorImageDownsampleType=/Bicubic -dNOPAUSE -dBATCH -sOutputFile=output.pdf input.pdf"
cmd /c "& '../.tools/gs/bin/gswin64c.exe' -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dDetectDuplicateImages=true -dCompressFonts=true -dSubsetFonts=true -dConvertCMYKImagesToRGB=true -dNOPAUSE -dBATCH -sOutputFile=output.pdf input.pdf"
& "../.tools/qpdf/bin/qpdf.exe" --linearize --object-streams=generate --compress-streams=y --recompress-flate input.pdf output.pdf
-dDetectDuplicateImages=true - Replace duplicate images with references-dCompressFonts=true - Compress font data-dSubsetFonts=true - Include only used glyphs-dConvertCMYKImagesToRGB=true - Convert CMYK to RGB (smaller)-dColorImageDownsampleType=/Bicubic - Better quality downsamplingpdfimages -list to understand image content before optimizing_pdf_to_jpg_converted/--pages to avoid converting entire large PDFsFor initial installation, see SETUP.md in this skill folder.
Tool locations:
../.tools/7z/../.tools/poppler/../.tools/qpdf/../.tools/gs/../.tools/_installer/../.tools/_pdf_to_jpg_converted/../.tools/_pdf_output/Provides coding style rules for Python and PowerShell. Apply when writing, editing, reviewing, or debugging code.
Apply when conducting deep research on technologies, APIs, frameworks, or other software development topics requiring systematic investigation
Apply when doing planning for long-running tasks in sessions on top level
Apply when committing code, writing commit messages, or configuring .gitignore
Apply when working with GitHub repositories, issues, PRs, or authentication
Apply when interacting with Google services (Gmail, Calendar, Drive, Tasks) via gogcli CLI