{ "name": "poppler", "version": "26.04.0", "summary": "Poppler's command-line tools: pdftoppm (pages to PNG or JPEG), pdftotext, pdfinfo, pdfimages, pdfunite, pdfseparate and more", "category": "tool", "license": "GPL-2.0-or-later OR GPL-3.0-only", "homepage": "https://poppler.freedesktop.org/", "source": { "url": "https://poppler.freedesktop.org/poppler-26.04.0.tar.xz", "sha256": "b0955163114af96bc0106f68cb24daf973a629462453d8b82775f81b0d4e0693" }, "watch": { "kind": "index", "url": "https://poppler.freedesktop.org/releases.html", "regex": "poppler-([0-9]+\\.[0-9]+\\.[0-9]+)\\.tar\\.xz" }, "deps": [ "freetype", "libjpeg-turbo", "libpng", "zlib" ], "env_packages": [], "static": true, "nss": false, "check": "t=$(mktemp -d) && bin/pdfinfo -v 2>&1 | has '^pdfinfo version 26\\.04\\.0' && python3 -c 'import sys; img = bytes(((x * y * 31 + x * 7) % 256 if c == 0 else (x * 2) % 256 if c == 1 else (y * 2) % 256) for y in range(128) for x in range(128) for c in range(3)); page = b\"q 0.2 0.4 0.8 rg 20 20 160 60 re f Q q 200 0 0 200 220 20 cm /Im1 Do Q BT /F1 24 Tf 20 120 Td (Hello WebPortico) Tj ET\"; objs = [b\"<< /Type /Catalog /Pages 2 0 R >>\", b\"<< /Type /Pages /Kids [3 0 R] /Count 1 >>\", b\"<< /Type /Page /Parent 2 0 R /MediaBox [0 0 440 240] /Contents 4 0 R /Resources << /Font << /F1 5 0 R >> /XObject << /Im1 6 0 R >> >> >>\", b\"<< /Length %d >>\\nstream\\n\" % len(page) + page + b\"\\nendstream\", b\"<< /Type /Font /Subtype /Type1 /BaseFont /Helvetica >>\", b\"<< /Type /XObject /Subtype /Image /Width 128 /Height 128 /ColorSpace /DeviceRGB /BitsPerComponent 8 /Length %d >>\\nstream\\n\" % len(img) + img + b\"\\nendstream\"]; out = b\"%PDF-1.4\\n\"; offs = []; exec(\"for i, o in enumerate(objs):\\n offs.append(len(out))\\n out += b\\\"%d 0 obj\\\\n\\\" % (i + 1) + o + b\\\"\\\\nendobj\\\\n\\\"\"); x = len(out); out += b\"xref\\n0 %d\\n0000000000 65535 f \\n\" % (len(objs) + 1) + b\"\".join(b\"%010d 00000 n \\n\" % o for o in offs) + b\"trailer\\n<< /Size %d /Root 1 0 R >>\\nstartxref\\n%d\\n%%%%EOF\\n\" % (len(objs) + 1, x); open(sys.argv[1], \"wb\").write(out)' \"$t/a.pdf\" && bin/pdfinfo \"$t/a.pdf\" > \"$t/info\" && has -E '^Pages: +1$' < \"$t/info\" && has -E '^Page size: +440 x 240 pts' < \"$t/info\" && bin/pdftotext \"$t/a.pdf\" - 2>/dev/null | has 'Hello WebPortico' && bin/pdftoppm -png -r 72 -f 1 -l 1 -singlefile \"$t/a.pdf\" \"$t/p\" 2>/dev/null && od -An -tx1 -N8 \"$t/p.png\" | tr -d ' \\n' | has -x 89504e470d0a1a0a && od -An -tx1 -j16 -N8 \"$t/p.png\" | tr -d ' \\n' | has -x 000001b8000000f0 && bin/pdftoppm -jpeg -scale-to 120 -singlefile \"$t/a.pdf\" \"$t/s\" 2>/dev/null && od -An -tx1 -N3 \"$t/s.jpg\" | tr -d ' \\n' | has -x ffd8ff && bin/pdfimages -list \"$t/a.pdf\" | has -E '^ +1 +0 image +128 +128 +rgb' && bin/pdfseparate -f 1 -l 1 \"$t/a.pdf\" \"$t/one-%d.pdf\" && bin/pdfunite \"$t/one-1.pdf\" \"$t/a.pdf\" \"$t/two.pdf\" && bin/pdfinfo \"$t/two.pdf\" | has -E '^Pages: +2$' && [ -s share/doc/poppler/COPYING ] && echo 'poppler 26.04.0: a one-page PDF (440x240 pt, a 128x128 image, a line of text) read by pdfinfo, its text by pdftotext, drawn to a 440x240 PNG and a JPEG thumbnail by pdftoppm, its image listed by pdfimages, split and joined by pdfseparate and pdfunite; its licence in share/doc/poppler'" }