{"id":4794,"date":"2025-12-05T20:27:51","date_gmt":"2025-12-05T11:27:51","guid":{"rendered":"https:\/\/matoken.org\/blog\/?p=4794"},"modified":"2025-12-05T20:27:53","modified_gmt":"2025-12-05T11:27:53","slug":"pdfgrep","status":"publish","type":"post","link":"https:\/\/matoken.org\/blog\/2025\/12\/05\/pdfgrep\/","title":{"rendered":"pdf\u30d5\u30a1\u30a4\u30eb\u3092\u76f4\u63a5grep\u3067\u304d\u308bpdfgrep"},"content":{"rendered":"<p><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"48\" height=\"48\" viewBox=\"0 0 32 32\"><path fill=\"currentColor\" d=\"M30.472 6.1H25.9V1.525h1.53V0H6.092v12.2h-1.52v1.52h1.52v3.05h-1.52v-3.05h-1.52v12.19h1.52v1.52h1.52V32H32V4.575h-1.53ZM7.622 18.285h4.57v4.57h-3.05v3.05h-1.52Zm22.85 12.19H7.622v-3.05H25.9v-1.52h1.53v-7.62H25.9v-1.52H7.622V1.525h16.76v6.09h6.09Zm-12.19-10.67v4.58h-1.52v1.52h-3.05v-7.62h3.05v1.52Zm6.1 1.53v1.52h-3.05v3.05h-1.52v-7.62h4.57v1.52h-3.05v1.53Z\"\/><path fill=\"currentColor\" d=\"M28.952 3.045h1.52v1.53h-1.52Zm-1.52-1.52h1.52v1.52h-1.52Zm-12.19 18.28h1.52v4.58h-1.52Zm-6.1 0h1.53v1.53h-1.53Z\"\/><\/svg><!-- streamline-pixel:content-files-pdf --><\/p>\n<div class=\"paragraph\">\n<p><a href=\"https:\/\/terminaltrove.com\/\">Terminal Trove<\/a> \u3067pdfgrep \u3068\u3044\u3046\u30c4\u30fc\u30eb\u3092\u77e5\u3063\u305f\u306e\u3067\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\uff0e<\/p>\n<\/div>\n<div class=\"ulist\">\n<ul>\n<li>\n<p><a href=\"https:\/\/gitlab.com\/pdfgrep\/pdfgrep\">pdfgrep \/ pdfgrep \u00b7 GitLab<\/a><\/p>\n<div class=\"ulist\">\n<ul>\n<li>\n<p><a href=\"https:\/\/terminaltrove.com\/pdfgrep\/\">pdfgrep &#8211; A command line utility to search text in PDF files. &#8211; Terminal Trove<\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pdfgrep.org\/\">pdfgrep<\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<p><!--more--><\/p>\n<div class=\"paragraph\">\n<p>pdfgrep \u306fpdf \u30d5\u30a1\u30a4\u30eb\u3092grep \u3068\u540c\u69d8\u30d1\u30bf\u30fc\u30f3\u306b\u30de\u30c3\u30c1\u3059\u308b\u884c\u3092\u8868\u793a\u3057\u3066\u304f\u308c\u308b\u3082\u306e\u3067\u3059\uff0e\u30aa\u30d7\u30b7\u30e7\u30f3\u306f <code>GNU grep<\/code> \u3092\u3042\u308b\u7a0b\u5ea6\u8e0f\u8972\u3057\u3066\u3044\u307e\u3059\uff0e<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"title\">Debian sid \u74b0\u5883\u3067source \u304b\u3089build \u3059\u308b\u4f8b<\/div>\n<div class=\"content\">\n<pre>$ sudo apt install libgcrypt20-dev libpoppler-cpp-dev\n$ git clone https:\/\/gitlab.com\/pdfgrep\/pdfgrep\n$ cd pdfgrep\n$ .\/autogen.sh\n$ .\/configure --prefix=$HOME\/usr\/local\n$ make\n$ make install<\/pre>\n<\/div>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"title\">help<\/div>\n<div class=\"content\">\n<pre>$ pdfgrep --help\nUsage: .\/src\/pdfgrep [OPTION]... PATTERN FILE...\n\nSearch for PATTERN in each FILE.\nPATTERN is, by default, an extended regular expression.\n\nCommonly used options:\n -i, --ignore-case              Ignore case distinctions\n -P, --perl-regexp              Use Perl compatible regular expressions (PCRE)\n -H, --with-filename            Print the file name for each match\n -h, --no-filename              Suppress the prefixing of file name on output\n -n, --page-number              Print page number with output lines\n -c, --count                    Print only a count of matches per file\n     --color WHEN               Use colors for highlighting;\n                                WHEN can be `always', `never' or `auto'\n -p, --page-count               Print only a count of matches per page\n -m, --max-count NUM            Stop reading after NUM matching lines (per file)\n -q, --quiet                    Suppress normal output\n -r, --recursive                Search directories recursively\n -R, --dereference-recursive    Likewise, but follow all symlinks\n     --cache                    Use cache for faster operation\n     --help                     Print this help\n -V, --version                  Show version information\n\nThe above list is only a selection of commonly used options. Please refer\nto the man page for a complete list.<\/pre>\n<\/div>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"title\">\u9069\u5f53\u306apdf \u30d5\u30a1\u30a4\u30eb\u3092grep<\/div>\n<div class=\"content\">\n<pre>$ pdfgrep raspberry ~\/Downloads\/MagPi128.pdf | head\nraspberrypi.com\n                       magpi@raspberrypi.com\n                       forums.raspberrypi.com\n                                                     lucy@raspberrypi.com\n                                                     rob@raspberrypi.com\n                                                     charlotte.milligan@raspberrypi.com\n                                                     brian.jepson@raspberrypi.com\n Learn Sense HAT             magpi@raspberrypi.com             (CC BY-NC-SA 3.0).<\/pre>\n<\/div>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"title\">GNU grep \u3067\u3088\u304f\u4f7f\u3046\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u5229\u7528<\/div>\n<div class=\"content\">\n<pre>$ pdfgrep -m5 -n -i raspberry ~\/Downloads\/MagPi128.pdf\n1:Issue 128     April 2023   magpi.cc    The official Raspberry Pi magazine\n1:   Discover coding with Raspberry Pi\n1:            NEW! RASPBERRY PI GLOBAL SHUTTER CAMERA\n2: Industrial Raspberry Pi\n3:(page 44) can help you out on this journey. I hope you take it.                 Raspberry Pi office\n                                     This Month in Raspberry Pi<\/pre>\n<\/div>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"title\">\u65e5\u672c\u8a9e\u3082ok<\/div>\n<div class=\"content\">\n<pre>$ pdfgrep -r -m1 -n \u30b5\u30fc\u30d0\u30fc ~\/Nextcloud_matoken\\@files.matoken.org\/Linux\/2025\/\n\/home\/matoken\/Nextcloud_matoken@files.matoken.org\/Linux\/2025\/\/sakura-cominuty-2025\/snac-kagolug.pdf:2:\u30b5\u30fc\u30d0\u30fc\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e server.json \u3092\u7de8\u96c6\u3057\u307e\u3059\u3002 \"protocol\" \u3092\n\/home\/matoken\/Nextcloud_matoken@files.matoken.org\/Linux\/2025\/\/kagolug2025.08\/slide\/slide.pdf:1:  \u30eb\u30b5\u30fc\u30d0\u30fc\u306e\n\/home\/matoken\/Nextcloud_matoken@files.matoken.org\/Linux\/2025\/\/kagolug2025.09\/slide\/slide.pdf:19:ActivityPub\u3082\u5c11\u3057\u63a2\u3057\u305f\u304c\uff0c\u81ea\u5206\u3068\u30b5\u30fc\u30d0\u30fc\u306e\u843d\u3061\u3066\u3044\u308b\u3082\u306e\u3057\u304b\n\/home\/matoken\/Nextcloud_matoken@files.matoken.org\/Linux\/2025\/\/kagolug2025.09\/slide\/matoken-slide.pdf:19:ActivityPub\u3082\u5c11\u3057\u63a2\u3057\u305f\u304c\uff0c\u81ea\u5206\u3068\u30b5\u30fc\u30d0\u30fc\u306e\u843d\u3061\u3066\u3044\u308b\u3082\u306e\u3057\u304b\n\/home\/matoken\/Nextcloud_matoken@files.matoken.org\/Linux\/2025\/\/kagolug2025.10\/slide\/slide.pdf:10:     2     \u30b5\u30fc\u30d0\u30fc\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u7de8\u96c6\uff0e\"protocol\" \u3092 \"http\"<\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u8a73\u7d30\u306f\u4ee5\u4e0b\u3092\uff0e<\/p>\n<\/div>\n<div class=\"ulist\">\n<ul>\n<li>\n<p><a href=\"https:\/\/pdfgrep.org\/doc.html\">pdfgrep &#8211; Manpage for 2.2.0<\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<div class=\"paragraph\">\n<p>\u3053\u308c\u307e\u3067\u306fpdf \u30d5\u30a1\u30a4\u30eb\u3092pdftotext \u306a\u3069\u3067\u30c6\u30ad\u30b9\u30c8\u306b\u5909\u63db\u3057\u3064\u3064grep \u306a\u3069\u3057\u3066\u3044\u307e\u3057\u305f\u304c\u3053\u308c\u3060\u3068\u3069\u306e\u30da\u30fc\u30b8\u5316\u304c\u5206\u304b\u308a\u3065\u3089\u304b\u3063\u305f\u3067\u3059\uff0epdfgrep \u3060\u3068 <code>-n<\/code> \u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u884c\u6570\u3067\u306f\u306a\u304f\u30da\u30fc\u30b8\u6570\u306b\u306a\u308b\u306e\u3067\u3053\u306e\u3042\u305f\u308a\u304c\u308f\u304b\u308a\u3084\u3059\u304f\u306a\u3063\u3066\u826f\u3055\u305d\u3046\u3067\u3059\uff0e<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre>$ pdftotext ~\/Downloads\/RetroBSD_and_LiteBSD.pdf - | grep -m5 -n -i retro\n1:RetroBSD and LiteBSD:\n15:  Contributing to RetroBSD since 2013\n30:  RetroBSD: an OS from the past in 128k RAM\n35:\n   RetroBSD and LiteBSD: an overview\n39:  RetroBSD: PIC32MX\n$ pdfgrep -m5 -n -i retro ~\/Downloads\/RetroBSD_and_LiteBSD.pdf\n1:RetroBSD and LiteBSD:\n3:  Contributing to RetroBSD since 2013\n4:  RetroBSD: an OS from the past in 128k RAM\n5:RetroBSD and LiteBSD: an overview\n5:     RetroBSD: PIC32MX<\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>\u3068\uff0c\u4e00\u901a\u308a\u904a\u3093\u3067\u304b\u3089\u6c17\u3065\u3044\u305f\u306e\u3067\u3059\u304c\uff0cdebian \u306b\u306fpdfgrep \u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u7d50\u69cb\u524d\u304b\u3089\u5b58\u5728\u3057\u3066\u3044\u307e\u3057\u305f\uff0e<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre>$ apt-cache search pdfgrep\npdfgrep - \u6b63\u898f\u8868\u73fe\u306b\u30de\u30c3\u30c1\u3059\u308b\u6587\u5b57\u5217\u3092 pdf \u30d5\u30a1\u30a4\u30eb\u5185\u3067\u691c\u7d22\n$ rmadison pdfgrep\npdfgrep    | 2.1.2-1       | oldoldstable   | source, amd64, arm64, armhf, i386\npdfgrep    | 2.1.2-1       | oldstable      | source, amd64, arm64, armel, armhf, i386, mips64el, mipsel, ppc64el, s390x\npdfgrep    | 2.2.0-0.1     | stable         | source\npdfgrep    | 2.2.0-0.1     | testing        | source\npdfgrep    | 2.2.0-0.1     | unstable       | source\npdfgrep    | 2.2.0-0.1     | unstable-debug | source\npdfgrep    | 2.2.0-0.1+b2  | stable         | amd64, arm64, armel, armhf, i386, ppc64el, riscv64, s390x\npdfgrep    | 2.2.0-0.1+b2  | testing        | amd64, arm64, armhf, i386, ppc64el, riscv64, s390x\npdfgrep    | 2.2.0-0.1+b2  | unstable       | amd64, arm64, armhf, i386, ppc64el, riscv64, s390x\n$ sudo apt install pdfgrep\n$ \/usr\/bin\/pdfgrep -V\nThis is pdfgrep version 2.2.0.\n\nUsing poppler version 25.03.0\nUsing libpcre2 version 10.46 2025-08-27<\/pre>\n<\/div>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"title\">\u74b0\u5883<\/div>\n<div class=\"content\">\n<pre>$ pdfgrep -V\nThis is pdfgrep version 2.2.0.\n\nUsing poppler version 25.03.0\nUsing libpcre2 version 10.46 2025-08-27\nBuilt from git-commit v2.2.0-7-gaa71955\n$ \/usr\/bin\/pdfgrep -V\nThis is pdfgrep version 2.2.0.\n\nUsing poppler version 25.03.0\nUsing libpcre2 version 10.46 2025-08-27\n$ dpkg-query -W poppler-utils\npoppler-utils   25.03.0-11.1+b1\n$ pdftotext -v\npdftotext version 25.03.0\nCopyright 2005-2025 The Poppler Developers - http:\/\/poppler.freedesktop.org\nCopyright 1996-2011, 2022 Glyph &amp; Cog, LLC\n$ lsb_release -dr\nDescription:    Debian GNU\/Linux forky\/sid\nRelease:        n\/a\n$ arch\nx86_64<\/pre>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Terminal Trove \u3067pdfgrep \u3068\u3044\u3046\u30c4\u30fc\u30eb\u3092\u77e5\u3063\u305f\u306e\u3067\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\uff0e pdfgrep \/ pdfgrep \u00b7 GitLab pdfgrep &#8211; A command line utility [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"webmentions_disabled_pings":false,"webmentions_disabled":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"federated","footnotes":""},"categories":[7,6,199],"tags":[442,1239],"class_list":["post-4794","post","type-post","status-publish","format-standard","hentry","category-debian-linux","category-linux","category-sid","tag-pdf","tag-pdfgrep"],"_links":{"self":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts\/4794","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/comments?post=4794"}],"version-history":[{"count":1,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts\/4794\/revisions"}],"predecessor-version":[{"id":4795,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts\/4794\/revisions\/4795"}],"wp:attachment":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/media?parent=4794"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/categories?post=4794"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/tags?post=4794"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}