{"id":32372666,"url":"https://github.com/cako/annotate_pdf","last_synced_at":"2025-10-24T21:55:56.151Z","repository":{"id":142054591,"uuid":"2157644","full_name":"cako/annotate_pdf","owner":"cako","description":"Simple script to automate the annotation of PDFs via stamping of .tex masks.","archived":false,"fork":false,"pushed_at":"2011-08-06T17:24:17.000Z","size":104,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-03-12T09:41:54.743Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cako.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-08-04T23:23:39.000Z","updated_at":"2023-03-12T09:46:14.175Z","dependencies_parsed_at":"2023-03-12T09:46:13.885Z","dependency_job_id":null,"html_url":"https://github.com/cako/annotate_pdf","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/cako/annotate_pdf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cako%2Fannotate_pdf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cako%2Fannotate_pdf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cako%2Fannotate_pdf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cako%2Fannotate_pdf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cako","download_url":"https://codeload.github.com/cako/annotate_pdf/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cako%2Fannotate_pdf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280872010,"owners_count":26405606,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-24T02:00:06.418Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-24T21:54:40.588Z","updated_at":"2025-10-24T21:55:56.139Z","avatar_url":"https://github.com/cako.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"README\n======\n\nIntroduction\n------------\n\nAnnotating PDF files is hard. There are a few\noptions, but none of them are good enough for the\ntechnically inclined. Most PDF annotators use either\nASCII text or free form tools.\n\nThe question arises: How does one annotate a PDF\nwith LaTeX notation. The answer is, you simply\ndon't.\n\nThis little script might be the beginning of a\npositive answer. The idea of the solution is to\ncreate another PDF with the annotations, then\n\"stamp\" it on the original PDF one needs to\nannotate.\n\nThe manual process was first described on [this\nblog](http://3diagramsperpage.wordpress.com/2011/07/29/mathematical-annotations-in-pdf-documents/).\nAfter the author contacted me, I took it upon myself\nto automate the process a bit, and the result are\nthese two perl scripts. Hopefully, I won't stop\nhere, and will find even better ways to quickly\nannotate PDFs.\n\nRequirements\n------------\n* [perl](http://www.perl.org/get.html)\n* [pdftk](http://www.pdflabs.com/docs/install-pdftk/)\n* [pdfinfo](http://www.foolabs.com/xpdf/) (part of the xpdf utilities for PDF files)\n* pdflatex\n\nInstallation\n------------\nThe tricky part here is the installation of the requirements, and not the program itself.\n\n### Ubuntu\n\n    sudo apt-get install perl pdftk poppler-utils texlive\n\n### Windows\n\nDownload Strawberry Perl [here](http://strawberryperl.com/) and install it.\nDownload `pdftk` [here](http://strawberryperl.com/). To install it, copy\nthe two files (a `.exe` and a `.dll`) to the\n`C:\\WINDOWS\\system32\\` folder.\nDownload `pdfinfo` from\n[here](http://www.foolabs.com/xpdf/download.html),\nand copy `pdfinfo.exe` to the `C:\\WINDOWS\\system32\\` folder.\nFinally, install a LaTeX distribution such as\n[MiKTeX](http://miktex.org/2.9/setup) if you\ndon't already have one.\n    \nInstructions\n------------\n\nYou will need a mask file, which will be used to\nstamp the PDF. The default mask is\n`default_mask.tex`. Edit it with your notes and\nsave it to file `INPUT_MASK`.\n\nThen simply run\n    \n    perl annotate_pdf.pl INPUT_PDF INPUT_MASK\n\nThis will generate a file with `_annotated` appended\nto the filename of `INPUT_PDF`. You are done!\n\n### Options\n\nIf you want the leftover files from the pdflatex\ncompilation run with option `-a`. \n\nIf, for some reason, your mask it too complicated to\nbe rendered by a simple `pdflatex` compilation, you\ncan run\n\n    perl generate_mask.pl INPUT_PDF INPUT_MASK\n\nthen compile the `.tex` using whatever method you want,\nand finally run\n\n    perl -n annotate_pdf.pl INPUT_PDF INPUT_MASK\n\nPlease Contribute!\n------------------\nThis code is licensed under the GNU General Public\nLicense version 3. Go ahead, fork it and improve it!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcako%2Fannotate_pdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcako%2Fannotate_pdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcako%2Fannotate_pdf/lists"}