Alternative `pdftk multistamp` to `pdftk` once it's no longer available?
I started a Java port of pdftk a few months back; at this point it should have the same functionality as the C++ version but a lot more testing is needed. If you want to give it a try, check https://gitlab.com/pdftk-java/pdftk and file a bug report when it breaks.
pdftk: multistamp: [File size increase after multistamp] vs [total text added due to multistamp] looks unreasonable
I think it is not that unreasonable. There is quite a bit of overhead for each page in addition to the numbers: headers, dimensions, font selection, positioning... this can easily take 200 bytes per page, or close to 1MB. Include a font and that takes some more space.
When you use pdftk to overlay the files, you get even more overhead: now you have to record which page goes where, in which position, how to scale it, etc. Again, a few bytes per page, but when you have 4k pages it shows.
You may wonder how is it possible to have a 4k page PDF with only 7.5MB in size. Once you have all the headers of a page in place, the text contents can be compressed, and if it is a simple text-only PDF it will compress well.
Of course it is possible to add the page numbers directly to each page, by modifying the contents of the pages, and that will have a way lower overhead, maybe 20 bytes per page, but then you will need a more precise tool than pdftk, which needs the overhead in order to be generic.
Perhaps a middle ground is to use a tool like pdfjam, see this recent question: How to add footer to pdf with pdfjam or pdftk?.
Related Topics
Setting Up a Cronjob on Google Compute Engine
How to Export Symbol from Linux Kernel Module in This Case
How to Assign a Name for a Screen
Linux How to Copy But Not Overwrite
How to Increase the Scrollback Buffer in a Running Screen Session
How to Extract the Contents of an Rpm
Get Specific Line from Text File Using Just Shell Script
Find the Ip Address of the Client in an Ssh Session
Symbolic Link: Find All Files That Link to This File
Linux Find File Names with Given String Recursively
Counting Number of Directories in a Specific Directory
Realuid, Saved Uid, Effective Uid. What's Going On
What Does a Hexadecimal Number, with a Register in Parenthesis Mean in Assembly
How to Imshow with Invisible Figure in Matlab Running on Linux
Removing Sensitive Data from Git. "Fatal: Ambiguous Argument 'Rm'"