OpenParable
Skip to content
← Back to skills

PDF Rotate

Documents
pdf_rotate

PDF Rotate is an Agent Skill for documents published in the cas-bigdatalab/piflow repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

旋转PDF页面方向。支持顺时针90度、180度、270度旋转。当用户需要旋转PDF页面方向时使用此skill。

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/cas-bigdatalab/piflow/blob/HEAD/workspace/skills/pdf_rotate/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/pdf-rotate, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

pdf_rotate 技能

功能说明

该技能旋转PDF页面方向,支持顺时针90度、180度、270度旋转,适用于调整PDF页面方向的场景。

核心功能

  • 支持90/180/270度顺时针旋转
  • 可指定页码范围进行选择性旋转
  • 自动创建输出目录

使用方法

python scripts/run_pdf_rotate.py --input_path <输入PDF> --output_path <输出PDF> [--angle <角度>] [--pages <页码范围>]

参数说明

参数类型必填默认值说明
input_pathstring是-输入PDF文件路径
output_pathstring是-输出PDF文件路径
angleint否90旋转角度(90/180/270)
pagesstring否全部页码范围,如"1-3,5"

示例

示例1:旋转全部页面90度

python scripts/run_pdf_rotate.py --input_path input.pdf --output_path rotated.pdf --angle 90

示例2:旋转指定页码180度

python scripts/run_pdf_rotate.py --input_path input.pdf --output_path rotated.pdf --angle 180 --pages "2-5"

示例3:旋转全部页面270度

python scripts/run_pdf_rotate.py --input_path input.pdf --output_path rotated.pdf --angle 270

注意事项

  • 仅支持90、180、270度旋转
  • 不指定pages参数时旋转全部页面
  • 输出目录不存在时会自动创建