merge-pdf

TotalClaw 作者 totalclaw

将多个用户提供的 PDF 文件上传到跨服务解决方案,轮询直至完成,然后返回合并后的 PDF 的下载 URL,从而合并多个用户提供的 PDF 文件。

安装 / 下载方式

TotalClaw CLI推荐
totalclaw install totalclaw:totalclaw~crossservicesolutions-merge-pdf
cURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/totalclaw%3Atotalclaw~crossservicesolutions-merge-pdf/file -o crossservicesolutions-merge-pdf.md
## 概述(中文)

将多个用户提供的 PDF 文件上传到跨服务解决方案,轮询直至完成,然后返回合并后的 PDF 的下载 URL,从而合并多个用户提供的 PDF 文件。

## 原文

# merge-pdf-files

## Purpose
This skill merges multiple PDFs by:
1) accepting multiple PDF files from the user,
2) uploading them to the Cross-Service-Solutions merge API,
3) polling the job status until it is finished,
4) returning the merged PDF download URL.

## Credentials
The API requires an API key used as a Bearer token:
- `Authorization: Bearer <API_KEY>`

How the user gets an API key:
- https://login.cross-service-solutions.com/register
- Or the user can provide an API key directly.

**Rule:** never echo or log the API key.

## API endpoints
Base URL:
- `https://api.xss-cross-service-solutions.com/solutions/solutions`

Create merge job:
- `POST /api/30`
- `multipart/form-data` parameters:
  - `files` (PDF Dokument) — required — multiple PDF files (multiple_files)

Get result by ID:
- `GET /api/<ID>`

When done, the response contains:
- `output.files[]` with `{ name, path }` where `path` is a downloadable URL.

## Inputs
### Required
- One or more PDF files (binary)
- An API key (string)

### Optional
- None (ordering is determined by the provided file list order)

## Output
Return a structured result:
- `job_id` (number)
- `status` (string)
- `download_url` (string, when done)
- `file_name` (string, when available)
- `input_files` (array of strings)

Example output:
```json
{
  "job_id": 456,
  "status": "done",
  "download_url": "https://.../merged.pdf",
  "file_name": "merged.pdf",
  "input_files": ["a.pdf", "b.pdf", "c.pdf"]
}