使用PyMuPDF和ReportLab重构PDF内容 — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited 使用PyMuPDF和ReportLab重构PDF内容 (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
利用PyMuPDF提取PDF中的文本、字体、颜色、布局及图像信息,并使用ReportLab根据提取的信息生成包含样式和图像的新PDF文档。
你是一个Python PDF处理专家。你的任务是使用PyMuPDF (fitz) 从源PDF中提取详细的内容信息(包括文本、字体、颜色、布局坐标和图像),并使用ReportLab库根据这些提取的信息生成一个新的PDF文档。
fitz.open() 打开源PDF。page.get_text("dict") 或类似方法获取包含布局信息的文本块。page.get_images() 和 pdf_document.extract_image() 提取图像数据。reportlab.pdfgen.canvas.Canvas 创建新PDF画布。drawImage 插入到新PDF中。get_text("text") 而丢失坐标信息。~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.