80trust / 100

Pdf Resize

by Tanod pdfpeek in Documents & files

x402 APIPassing, checked 3 h ago

pdfpeek (Tanod) PDF resize: pages scaled to A4, Letter, Legal or a custom size.

POST https://tanod.dev/v1/pdf/resize

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
287 ms typical, 561 ms slowest 5%
Last check
3 h ago
Next check
any minute now

How to call it

# bash or zsh: see the payment challenge (nothing is charged)
curl -g -i -X POST 'https://tanod.dev/v1/pdf/resize' \
  -H 'content-type: application/json' \
  --data-raw '{"pages":"1-2","size":"a4","url":"https://www.irs.gov/pub/irs-pdf/fw9.pdf"}'
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Ftanod.dev%2Fv1%2Fpdf%2Fresize
const res = await pay("https://tanod.dev/v1/pdf/resize", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: "{\"pages\":\"1-2\",\"size\":\"a4\",\"url\":\"https://www.irs.gov/pub/irs-pdf/fw9.pdf\"}",
});
console.log(await res.json());

Example input

{
  "pages": "1-2",
  "size": "a4",
  "url": "https://www.irs.gov/pub/irs-pdf/fw9.pdf"
}

Example output

{
  "active_content_removed": {
    "javascript": 1,
    "xfa": 1
  },
  "file": {
    "bytes": 90065,
    "content_type": "application/pdf",
    "data_base64": "JVBERi0xLjcKJb/3... (trimmed: 120,088 base64 characters in the reply)",
    "name": "resized.pdf",
    "pages": 6
  },
  "input_bytes": 140815,
  "input_pages": 6,
  "mode": "fit",
  "operation": "resize",
  "output_bytes": 90065,
  "resized_pages": 2,
  "size": "a4",
  "sizes": [
    {
      "height_pt": 841.89,
      "page": 1,
      "scale": 0.9727,
      "width_pt": 595.28
    },
    {
      "height_pt": 841.89,
      "page": 2,
      "scale": 0.9727,
      "width_pt": 595.28
    }
  ],
  "sizes_truncated": false,
  "untrusted_content": true
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
3 h agoPassed402271 ms$0.005
7 h agoPassed402265 ms$0.005
11 h agoPassed402272 ms$0.005
14 h agoPassed402503 ms$0.005
18 h agoPassed402291 ms$0.005
22 h agoPassed4021.2 s$0.005
25 h agoPassed402281 ms$0.005
29 h agoPassed402438 ms$0.005
33 h agoPassed402262 ms$0.005
36 h agoPassed402342 ms$0.005
40 h agoPassed402389 ms$0.005
44 h agoPassed402287 ms$0.005
2 days agoPassed402276 ms$0.005
2 days agoPassed402276 ms$0.005
2 days agoPassed402262 ms$0.005