Skip to content

Commit 0880c6a

Browse files
committed
...
1 parent 5a7dca4 commit 0880c6a

File tree

8 files changed

+83
-34
lines changed

8 files changed

+83
-34
lines changed

en/content/2013/10/pdftk-manipulate-pdf/pdftk-manipulate-pdf.md

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,27 @@ Tags: pdftk, software, examples, PDF
88
Modified: 2024-11-13 10:19:11
99

1010

11-
It is suggested that you **use Python modules instead of `pdftk`** to manipulating PDFs for several reasons.
12-
First,
13-
even though `pdftk` is a great command-line tool,
14-
it is hard to remember its syntax.
15-
On the contratry,
16-
Python code is easy to read and understand (even though it is more verbose).
17-
Second,
18-
it is not easy to have `pdftk` installed and configured on macOS.
19-
Please refer to
20-
[PyPDF2 Examples](http://www.legendu.net/misc/blog/pypdf2-examples/)
21-
for a simple example of extracting PDF pages using the Python package `PyPDF2`.
22-
If you need to edit PDF pages,
23-
please refer to
24-
[Editing PDF Files](http://www.legendu.net/misc/blog/editing-PDF-files/)
25-
for possible tools.
26-
If you do have to stick with `pdftk`,
27-
below are concrete examples on how to use it.
11+
1. It is suggested that you **use Python modules instead of `pdftk`** to manipulating PDFs for several reasons.
12+
First,
13+
even though `pdftk` is a great command-line tool,
14+
it is hard to remember its syntax.
15+
On the contratry,
16+
Python code is easy to read and understand (even though it is more verbose).
17+
Second,
18+
it is not easy to have `pdftk` installed and configured on macOS.
19+
If you prefer a GUI-based application for manipulating PDF files,
20+
[Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF)
21+
is is a robust, locally hosted web-based PDF manipulation tool using Docker.
22+
23+
2. Please refer to
24+
[PyPDF2 Examples](http://www.legendu.net/misc/blog/pypdf2-examples/)
25+
for a simple example of extracting PDF pages using the Python package `PyPDF2`.
26+
If you need to edit PDF pages,
27+
please refer to
28+
[Editing PDF Files](http://www.legendu.net/misc/blog/editing-PDF-files/)
29+
for possible tools.
30+
If you do have to stick with `pdftk`,
31+
below are concrete examples on how to use it.
2832

2933
## Install pdftk on Ubuntu / Debian
3034

en/content/2016/06/editing-PDF-files/editing-PDF-files.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,15 @@ Modified: 2024-12-04 19:19:24
2121
</tr>
2222

2323
<tr>
24-
<td rowspan="5"> Web Tools </td>
24+
<td rowspan="6"> Web Tools </td>
25+
<td> <a href="https://github.com/Stirling-Tools/Stirling-PDF">Stirling-PDF</a> </td>
26+
<td>
27+
- robust <br>
28+
- local hosted <br>
29+
- Docker container based <br>
30+
</td>
31+
</tr>
32+
<tr>
2533
<td> <a href="https://app.parseur.com/">Parseur</a> </td>
2634
<td>
2735
- AI-based PDF parser

en/content/2019/05/python-pdf-pypdf/python-pdf-pypdf.ipynb

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,14 @@
1717
"cell_type": "markdown",
1818
"metadata": {},
1919
"source": [
20-
"The Python package PyPDF can be used to extract pages from a PDF file.\n",
20+
"1. The Python package PyPDF can be used to extract pages from a PDF file.\n",
2121
"The function [aiutil.pdf.extract_pages](https://github.com/legendu-net/aiutil/blob/dev/aiutil/pdf.py#L8) \n",
2222
"is a wrapper over PyPDF\n",
23-
"which makes it even easier to extract pages from a PDF file."
23+
"which makes it even easier to extract pages from a PDF file.\n",
24+
"\n",
25+
"\n",
26+
"2. [Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF) \n",
27+
"is is a robust, locally hosted web-based PDF manipulation tool using Docker.\n"
2428
]
2529
},
2630
{
@@ -63,7 +67,7 @@
6367
"Requirement already satisfied, skipping upgrade: sqlparse>=0.4.1 in /usr/local/lib/python3.8/dist-packages (from dsutil[pdf]@ git+https://github.com/dclong/dsutil@main) (0.4.1)\n",
6468
"Collecting PyPDF2>=1.26.0; extra == \"pdf\" or extra == \"all\"\n",
6569
" Downloading PyPDF2-1.26.0.tar.gz (77 kB)\n",
66-
"\u001b[K |\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 77 kB 3.3 MB/s eta 0:00:01\n",
70+
"\u001b[K |████████████████████████████████| 77 kB 3.3 MB/s eta 0:00:01\n",
6771
"\u001b[?25hRequirement already satisfied, skipping upgrade: attrs>=19.2.0 in /usr/local/lib/python3.8/dist-packages (from pytest>=3.0->dsutil[pdf]@ git+https://github.com/dclong/dsutil@main) (21.2.0)\n",
6872
"Requirement already satisfied, skipping upgrade: packaging in /usr/local/lib/python3.8/dist-packages (from pytest>=3.0->dsutil[pdf]@ git+https://github.com/dclong/dsutil@main) (21.0)\n",
6973
"Requirement already satisfied, skipping upgrade: py>=1.8.2 in /usr/local/lib/python3.8/dist-packages (from pytest>=3.0->dsutil[pdf]@ git+https://github.com/dclong/dsutil@main) (1.10.0)\n",
@@ -75,7 +79,7 @@
7579
"Requirement already satisfied, skipping upgrade: regex!=2019.02.19 in /usr/local/lib/python3.8/dist-packages (from dateparser>=0.7.1->dsutil[pdf]@ git+https://github.com/dclong/dsutil@main) (2021.8.3)\n",
7680
"Collecting numpy<1.21,>=1.17\n",
7781
" Downloading numpy-1.20.3-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (15.4 MB)\n",
78-
"\u001b[K |\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 15.4 MB 19.3 MB/s eta 0:00:01\n",
82+
"\u001b[K |████████████████████████████████| 15.4 MB 19.3 MB/s eta 0:00:01\n",
7983
"\u001b[?25hRequirement already satisfied, skipping upgrade: llvmlite<0.38,>=0.37.0rc1 in /usr/local/lib/python3.8/dist-packages (from numba>=0.53.0rc1->dsutil[pdf]@ git+https://github.com/dclong/dsutil@main) (0.37.0rc2)\n",
8084
"Requirement already satisfied, skipping upgrade: setuptools in /usr/lib/python3/dist-packages (from numba>=0.53.0rc1->dsutil[pdf]@ git+https://github.com/dclong/dsutil@main) (45.2.0)\n",
8185
"Requirement already satisfied, skipping upgrade: click>=7.0 in /usr/local/lib/python3.8/dist-packages (from notifiers>=1.2.1->dsutil[pdf]@ git+https://github.com/dclong/dsutil@main) (8.0.1)\n",
@@ -145,11 +149,11 @@
145149
"Connecting to www.legendu.net (www.legendu.net)|185.199.109.153|:80... connected.\n",
146150
"HTTP request sent, awaiting response... 200 OK\n",
147151
"Length: 140210 (137K) [application/pdf]\n",
148-
"Saving to: \u2018sum_and_product.pdf\u2019\n",
152+
"Saving to: ‘sum_and_product.pdf\n",
149153
"\n",
150154
"sum_and_product.pdf 100%[===================>] 136.92K --.-KB/s in 0.03s \n",
151155
"\n",
152-
"2023-09-17 11:52:34 (4.65 MB/s) - \u2018sum_and_product.pdf\u2019 saved [140210/140210]\n",
156+
"2023-09-17 11:52:34 (4.65 MB/s) - ‘sum_and_product.pdf saved [140210/140210]\n",
153157
"\n"
154158
]
155159
}
@@ -228,4 +232,4 @@
228232
},
229233
"nbformat": 4,
230234
"nbformat_minor": 4
231-
}
235+
}

misc/content/2015/05/okular-tips/okular-tips.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ Modified: 2023-09-22 12:35:08
99

1010
**Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!**
1111

12+
[Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF)
13+
is is a robust, locally hosted web-based PDF manipulation tool using Docker.
14+
15+
1216
1. Okular supporting annotating PDF pages
1317
but does not supporting adding/removing PDF pages.
1418

misc/content/2020/03/convert-web-pages-to-pdf-using-python/convert-web-pages-to-pdf-using-python.ipynb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@
2020
"**Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!**"
2121
]
2222
},
23+
{
24+
"cell_type": "markdown",
25+
"metadata": {},
26+
"source": [
27+
"[Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF) \n",
28+
"is is a robust, locally hosted web-based PDF manipulation tool using Docker.\n"
29+
]
30+
},
2331
{
2432
"cell_type": "markdown",
2533
"metadata": {},

misc/content/2021/07/hands-on-the-python-library-pdfplumber/hands-on-the-python-library-pdfplumber.ipynb

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@
2020
"**Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!**"
2121
]
2222
},
23+
{
24+
"cell_type": "markdown",
25+
"metadata": {},
26+
"source": [
27+
"[Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF) \n",
28+
"is is a robust, locally hosted web-based PDF manipulation tool using Docker.\n"
29+
]
30+
},
2331
{
2432
"cell_type": "code",
2533
"execution_count": 1,
@@ -31,17 +39,17 @@
3139
"text": [
3240
"Collecting pdfplumber\n",
3341
" Downloading pdfplumber-0.5.28.tar.gz (45 kB)\n",
34-
"\u001b[K |\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 45 kB 1.6 MB/s eta 0:00:01\n",
42+
"\u001b[K |████████████████████████████████| 45 kB 1.6 MB/s eta 0:00:01\n",
3543
"\u001b[?25hRequirement already satisfied: Pillow>=7.0.0 in /usr/local/lib/python3.8/dist-packages (from pdfplumber) (8.3.1)\n",
3644
"Collecting Wand\n",
3745
" Downloading Wand-0.6.6-py2.py3-none-any.whl (138 kB)\n",
38-
"\u001b[K |\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 138 kB 8.5 MB/s eta 0:00:01\n",
46+
"\u001b[K |████████████████████████████████| 138 kB 8.5 MB/s eta 0:00:01\n",
3947
"\u001b[?25hCollecting pdfminer.six==20200517\n",
4048
" Downloading pdfminer.six-20200517-py3-none-any.whl (5.6 MB)\n",
41-
"\u001b[K |\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 5.6 MB 22.0 MB/s eta 0:00:01\n",
49+
"\u001b[K |████████████████████████████████| 5.6 MB 22.0 MB/s eta 0:00:01\n",
4250
"\u001b[?25hCollecting pycryptodome\n",
4351
" Downloading pycryptodome-3.10.1-cp35-abi3-manylinux2010_x86_64.whl (1.9 MB)\n",
44-
"\u001b[K |\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 1.9 MB 46.7 MB/s eta 0:00:01\n",
52+
"\u001b[K |████████████████████████████████| 1.9 MB 46.7 MB/s eta 0:00:01\n",
4553
"\u001b[?25hRequirement already satisfied: chardet; python_version > \"3.0\" in /usr/lib/python3/dist-packages (from pdfminer.six==20200517->pdfplumber) (3.0.4)\n",
4654
"Collecting sortedcontainers\n",
4755
" Downloading sortedcontainers-2.4.0-py2.py3-none-any.whl (29 kB)\n",
@@ -77,11 +85,11 @@
7785
"Connecting to www.edd.ca.gov (www.edd.ca.gov)|134.186.117.17|:443... connected.\n",
7886
"HTTP request sent, awaiting response... 200 OK\n",
7987
"Length: 307728 (301K) [application/pdf]\n",
80-
"Saving to: \u2018eddwarncn12.pdf\u2019\n",
88+
"Saving to: ‘eddwarncn12.pdf\n",
8189
"\n",
8290
"eddwarncn12.pdf 100%[===================>] 300.52K 760KB/s in 0.4s \n",
8391
"\n",
84-
"2021-07-15 15:18:15 (760 KB/s) - \u2018eddwarncn12.pdf\u2019 saved [307728/307728]\n",
92+
"2021-07-15 15:18:15 (760 KB/s) - ‘eddwarncn12.pdf saved [307728/307728]\n",
8593
"\n"
8694
]
8795
}
@@ -371,7 +379,7 @@
371379
"source": [
372380
"## References\n",
373381
"\n",
374-
"- [Extracting Data from PDF Files](https://misc.legendu.net/blog/extracting-data-from-pdf-files/)",
382+
"- [Extracting Data from PDF Files](https://misc.legendu.net/blog/extracting-data-from-pdf-files/)\n",
375383
"- [Editing PDF Files](http://www.legendu.net/misc/blog/editing-PDF-files)"
376384
]
377385
},
@@ -415,4 +423,4 @@
415423
},
416424
"nbformat": 4,
417425
"nbformat_minor": 4
418-
}
426+
}

0 commit comments

Comments
 (0)