16 ms·
Stirling-PDF: local web application to perform various operations on PDFs
- rodlette 3y agoNice. I've been looking for something like this to self-host, to avoid my partner uploading sensitive documents to random PDF manipulation websites. Any better alternatives I should be considering?
- thephotonsphere 3y agoYou can simply use poppler-utils on your on computer? It's a collection of commandline tools for PDF-manipulation. More information can be found here: https://pypi.org/project/poppler-utils/ https://pypi.org/project/poppler-utils/
- Etheryte 3y agoIf you happen to be on macOS, the Preview app does an absurd number of things to PDFs, and it does it well. To be honest I'm always surprised it isn't highlighted more by Apple, it's a great tool that pretty much always just works. You can split files, join them, rotate, add signatures, drawings, annotations, redact sections, etc. The feature list is long, especially considering that by the name of the application you'd think it could just preview files, not edit them.
- sumedh 3y ago> to be honest I'm always surprised it isn't highlighted more by Apple Probably because its not so intuitive, I have to google how to use some of the advanced features of Preview.
- cde-v 3y agoEdge is surprising decent for marking up PDFs.
- somethingsome 3y agoI often use PDF Sam (basic) and usually it works quite well and is offline. https://pdfsam.org/ https://pdfsam.org/
- jftuga 3y agoA really nice, stand-alone command line tool is pdfcpu. https://github.com/pdfcpu/pdfcpu https://github.com/pdfcpu/pdfcpu
- rodlette 3y agoLooks great, but my partner needs something more convenient. It needs to be web based and work on desktop/mobile.
- bayindirh 3y agoKDE’s Okular. Works on Linux, Windows and macOS. If you’re on already macOS, Preview already has you covered.
- jbc1 3y agoDoes it need to be a self hosted web based tool or do you just need PDF software? If the latter I find PDF Expert to be powerful and nice to use.
- tony69 3y agoI use pdftool.org which I saw on HN a while back
- christkv 3y agoCan it add attachments to pdf files?. Until this year I did not even know that this was possible but a government agency asked me to add files as attachments to a pdf as their website only allowed uploading valid pdf files.
- alexzeitler 3y agoHave learned about it this year as well
- layer8 3y agoYou can use Acrobat Reader for that.
- rozman50 3y agohttps://tools.pdf24.org/en/creator https://tools.pdf24.org/en/creator This tools is not open source, but it’s free. Files should remain on local pc. Developers claim that they make money only by advertisement on their website.
- toasted-subs 3y agoSelf hosted sites are pretty awesome. Love seeing these here.
- zikohh 3y agoI like using https://www.pdftool.org/en https://www.pdftool.org/en
- kleiba 3y agoWhat about pdftk?
- eyegor 3y agopdftk has an issue where it corrupts pdfs occasionally in modern windows server versions. Had a weird bug in a random helper service at work that we narrowed down to pdftk mangling documents sometimes. Never looked much into it since it was only a couple of hours to replace it with another tool, and haven't had issues since. I think all we used it for was merging and adding watermark text.
- anjanb 3y ago"replace it with another tool" which tool was that ?
- laurensr 3y agoWhat seems to be missing is an OSS tool to add/remove form fields
- adamnemecek 3y agoI have not looked into this yet but can someone recommend an application for repairing pdfs? For example, I have PDFs where selecting text highlights a line above or below.
- me_jumper 3y agoTry converting it to PDF/A
- adamnemecek 3y agoThat's not it.
- layer8 3y agoThat doesn’t sound like the PDF is broken, just that it uses unusual font metrics or line displacements. Tools that could amend this are unlikely to exist. More generally, the PDF format is too flexible to decide what is “broken” or really is as intended, in many cases. It’s l a bit like asking for a tool that repairs “broken” source code where it’s really just the business logic that is broken.
- adamnemecek 3y agoSome ocr no?
- RyanShook 3y agoI have a PDF problem that I thought was simple but has proven difficult to solve and there is no paid solution I’ve found… I want to forward an email to an inbox, have the email body converted into a PDF, and then email that attachment to someone all automatically. I’ve tried Make, Zapier, pdf.co, pdftool, and a few other tools but have had no success. Has anyone solved this problem reliably?
- toomuchtodo 3y agohttps://news.ycombinator.com/item?id=38545255 https://news.ycombinator.com/item?id=38545255 https://www.tapdone.com/ https://www.tapdone.com/ perhaps? Or something similar?
- RyanShook 3y agoThanks for sharing!
- victorbojica 3y agoIf you are able to code or can ask someone, then you should be able to do it with some email api service (Nylas, AWS SES, etc) or headless client that gets the body of the email and convert it to pdf using wkhtmltopdf and then send it as attachment using the same service as before. Using low/no code tools might be very hard/unlikely
- RyanShook 3y agoThanks, yes I think this is the right direction. Surprised it doesn’t exist as SAAS, I guess demand isn’t there.
- geraldwhen 3y agoIf you want the pdf to look anything like the email, you will need to render it in a browser and capture a pdf. It’s not particularly hard if you know what you’re doing.
- karol 3y agoWhy can't this be an electron app?
- Froodle 3y agoDev here, totally could, we dismissed it at first as electron is quite bulky containing a whole chromium instance inside the exe. instead we kept it small as possible for the exe version We have plans for a full UI version in V2. We are releasing V1 (SPDF is currently in beta) sometime this month. But have begun work on a V2 port to different language and framework.
- eyegor 3y agoAs an alternative you could write some automation scripts to handle all the requirements for self hosted install. If you look at oogaboogas text-generation-webui [0] you can see what I mean. Although ease of install also leads to a larger user base, which can be a double edged sword for something as ubiquitous as a pdf app. It's much easier to get people to submit issues than to help solve them. [0] eg, windows install script https://github.com/oobabooga/text-generation-webui/blob/main/start_windows.bat https://github.com/oobabooga/text-generation-webui/blob/main...
- 101008 3y agoI still couldn't find a tool for a difficult problem to solve. I have some magazines in PDF, with layouts in two columns, etc. I want them to be transformed into Markdown. I know, it should identify automatically the two columns, different layouts, etc. I am not desiring something perfect - I can fix if ther are some errors, but so far nothing has come with a good result.
- layer8 3y agoThis can be arbitrarily difficult to do, depending on the PDF. This is generally called PDF reflowing. Another approach is to use column-aware OCR software.
- qingcharles 3y agoThis is a hard problem. Cut the PDF down so it's only the pages of the article you want and then try feeding it through GPT Pro or Claude?
- jftuga 3y agoHave you tried this (for at least solving part of the problem)? https://github.com/pdfcpu/pdfcpu https://github.com/pdfcpu/pdfcpu
- solardev 3y agoI use Briss for this: https://github.com/mbaeuerle/Briss-2.0 https://github.com/mbaeuerle/Briss-2.0 It overlays all the pages on top of each other, you the human draws rectangles around the stacked columns in the easy GUI, and then it processes them into pages.
- stavros 3y agoDepending on how much you're willing to pay, the OpenAI GPT-Vision API can definitely do this extremely well.
- 101008 3y agoI am willing to pay for this, I only have around ~80 files, with 30 pages each (average). Is there a quick way to test this without wasting too much on the code part?
- lordofgibbons 3y agoHow easy or difficult would it be to turn this into an electron app so that non-technical users can use it easily too?
- layer8 3y agoBetter use existing applications like PDFsam [0] or PDF-XChange [1]. [0] https://pdfsam.org/pdfsam-basic/ https://pdfsam.org/pdfsam-basic/ [1] https://pdf-xchange.eu/pdf-xchange-editor/ https://pdf-xchange.eu/pdf-xchange-editor/
- ornornor 3y agoWhy “better use some to big else”?
- Froodle 3y agoDev here, totally could, we dismissed it at first as electron is quite bulky containing a whole chromium instance inside the exe. instead we kept it small as possible for the exe version Truth is its not to hard to port to electron We have plans for a full UI version in V2. We are releasing V1 (SPDF is currently in beta) sometime this month. But have begun work on a V2 port to different language and framework.
- cyanydeez 3y agoQuasar.dev provides a full "interoperable" solution to get to electron and others. All the code can be written as regular Vue3, then built for: - SPAs (Single Page App) - SSR (Server-side Rendered App) (+ optional PWA client takeover) - PWAs (Progressive Web App) - BEX (Browser Extension) - Mobile Apps (Android, iOS, …) through Cordova or Capacitor Multi-platform Desktop Apps (using Electron) Might be worth considering if you're going full client.
- judge2020 3y agoIt would be nice if it were WASM-based. Then someone could host that version of the app and it'd still be local processing.
- ziofill 3y agoit says this started as a 100% chatGPT project!
- jwilk 3y agoWhat does it mean?
- monospaced 3y agoFrom my understanding they mean the code was generated by instructing OpenAI’s ChatGPT (contrary to writing the code themselves).
- d4rkp4ttern 3y agoI’ll join some other commenters, to add my favorite difficult pdf problem that I haven’t found a ready to use (even paid) solution for: extract key value pairs from a filled form such as this medical claims form: https://imgur.com/a/EJDi7L7 https://imgur.com/a/EJDi7L7 There are two levels of difficulty: the starting file could be an image (pdf or png or jpg), which is the most difficult scenario. The slightly easier one is where it’s a text-based pdf so no OCR is needed. I threw this as an image file at google form parser but it did poorly, I.e missed quite a few fields.
- Froodle 3y agoDev here for the above stirling pdf app, Please raise features like this as a feature request github issue ticket and we can try address it in future!
- kpandit 3y agoI would do exactly what you have done here if I were the dev of the said app. But with the luxury of being an outsider, a user has expressed an inconvenience and it seems to make sense, then if I were to be the dev of the app here, wouldn't I go and create the ticket in whatever system with a link to this post instead of asking the user of the app to follow the red tape? I know there are places where this is not incentivised so this is a question for your org and not for you.
- d4rkp4ttern 3y agoI tend to agree. As an open source dev myself, I avoid asking folks to create issues, as it puts a burden on the user. I’ve see some highly respected open source leads so this, and I’m not faulting them, as I think they’re coming from a good place; it may be a difference of opinion on what’s best practice.
- Froodle 3y agoI see what you're saying and for simple features I agree However Without the OP creating the ticket there can be no feedback look on the feature. If i wanted it tested for their usecase, there input and confirmation on if its what they wanted and improvements for the workflow etc.. If I base the whole feature on this comment it could end up only doing half a job. Id rather have that communication loop open!
- 11235813213455 3y agoDoes it support adding / managing named form fields?
- Froodle 3y agodev here, Not currently but its a planned feature
- tobinfricke 3y agoProbability density functions, presumably. Oh, partial differential equations? For the document files, I love PDF Studio: https://www.qoppa.com/pdfstudio/ https://www.qoppa.com/pdfstudio/
- deleted 3y ago[deleted]
- ObscureScience 3y agoWhat I have mainly have been looking for in the free software ecosystem is a good tool to work with PDF tagging/structure/element attributes. At work I really have only been able to do the work I need on random PDFs with Adobe Acrobat. It seems strange that this is the case as PDF is now an open standard.
- Ldorigo 3y agoLibreOffice Draw can do that (not sure about tagging).
- Alifatisk 3y agoIt's scary how such a widely used format (PDF) is almost in full control by Adobe. I have yet to see a true competitor to Adobe Acrobat. The only one that has come really close is the one that comes built-in for macOS. It's a hidden gem.
- philsnow 3y agoDoes that one have a name? I’m a MacOS transplant and have never gotten terribly familiar with the territory. Thanks!
- tonyedgecombe 3y agoPreview is the app on macOS that lets you view and even edit PDF files.
- jwong_ 3y agopreview.app
- cmdrriker 3y agoPreview.app which owes its heritage to NextStep. https://en.wikipedia.org/wiki/Preview https://en.wikipedia.org/wiki/Preview
- philsnow 3y ago... ah, thanks, I misread. I thought GP was talking about a document format in the same space as PDF that was native to MacOS.
- bla3 3y agoPDF had an open spec and oodles of programs supporting it. I don't understand where this comment is coming from.
- webel0 3y agoAdobe acrobat (and maybe reader) is really the only app that fully supports the full PDF spec as understood by the authors of the spec. There are ridiculous parts of the spec that allow support for things like JS, etc.
- nadermx 3y agoIt's funny to see this #1 on HN. I have a PDF converter site[0] that I did a show hn [1] years back, and have been currently pushing updates too as I work on a entire site redesign since the PDF niche is massive. I'm alleviated to see that some one actually made a package for PDF to OCR[2]. And that they are using it[3]. It will finally make what I was doing less hacky. [0] https://www.pdf.to https://www.pdf.to [1] https://news.ycombinator.com/item?id=23238862 https://news.ycombinator.com/item?id=23238862 [2] https://github.com/ocrmypdf/OCRmyPDF https://github.com/ocrmypdf/OCRmyPDF [3] https://github.com/Frooodle/Stirling-PDF#technologies-used https://github.com/Frooodle/Stirling-PDF#technologies-used
- pmarreck 3y agoNo one commented yet on how this entire app was built by ChatGPT?
- sagarpatil 3y agoYep. That's the most interesting thing here. OP can you elaborate on how you got it to develop a full fledged application?
- Froodle 3y agoSo the whole app is not made in chatgpt It started like that 11 months ago though yes I made the website and 7 pdf operations with chatgpt as a test to investigate chatgpts power and applications Everything after that has been manual though and basically all the code has been changed by now
- mderazon 3y agoI'm looking for a tool other than adobe pdf reader that lets me upload an image file of my signature to sign a pdf. Most of the tools I found let me draw a signature and I can't draw my signature on a track pad or with the mouse
- voltaireodactyl 3y agoPDF Expert is the best I’ve found that also does this, and while expensive, is a really robust and well done program. PDFpen also has this ability.
- whatisyour 3y agoXournal++ does what you are looking for.
- ajot 3y agoI use GIMP for that, and if I need it to look like printed-signed-scanned some ImageMagick incantation [0] or https://lookscanned.io/ https://lookscanned.io/ [0] https://news.ycombinator.com/item?id=30024658 https://news.ycombinator.com/item?id=30024658
- thebiglebrewski 3y agoFirefox can actually do this as long as your signature is in an image file.
- gpff 3y agoI made myself such a tool: https://pdf.rere.re https://pdf.rere.re It's js only, nothing is sent to the server. It automatically makes the background of signatures transparent. The result is a raster pdf as if you printed, signed and scanned the document. I use it on desktop, not sure if it works well on phones.
- nashashmi 3y agoBluebeam PDF has an amazing Stapler tool. I can have a job that combines various pages of various PDF files and does a few other operations on them. When time for print comes, I run the job and output a PDF. For a kind of work that has to frequently put together various pages of various PDFs repeatedly to send as draft for review, this is a tool that makes life easy. https://support.bluebeam.com/articles/revu-21-revu-configure-jobs-stapler/ https://support.bluebeam.com/articles/revu-21-revu-configure... However, I have yet to find an equivalent tool from any other PDF application. And that includes this one.
- zeagle 3y agoWould be really interesting to use this with paperless-ngx to annotate or watermark documents.
- cryingpotato 3y agoThis is really neat! Is there a paid product backing this or planned for the future? I'm curious what motivates all the dev hours going into it.
- Froodle 3y agoNo paid backing, just running on donations at the moment. I am tempted to try add a paid feature for AI integration or something or some high end office features as I have a fair few offices that use this software now. But to be honest I would always want it free and it's just been a hobby
- ryloric 3y agoCan this add paragraph numbers? I see page numbers in the README, but nothing on how I can number paragraphs.
- lukew3 3y agoDoes anybody know of a similar foss suite of pdf tools that runs as a static site only using local javascript? I would prefer that to something like this.
- mrfumier 3y agoBut... why? WHY?? Why would I run a docker container, a webserver, start a browser, navigate webpages... just to do some operations on a pdf locally? A few KiloBytes native program like PDFtk (https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/ https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/) does the job perfectly. I don't understand what is the point of bloating softwares like this. Not even speaking of the very bad consequences for the planet.
- deleted 3y ago[deleted]
- ornornor 3y agoA web app makes it cross platform. If you have a homelab, deploy it only once for every client. And PDFtk doesn’t do annotations afaik which is a huge pain point on Linux (at least for me) because there are no applications that I know of to easily do things that are trivial on OSX like adding text or hand drawn signatures to PDFs. Masterpdf can do it but with a watermark and some limitations. Maybe it doesn’t suit your particular use case but I wouldn’t say pdftk can replace this project.
- fagrobot 3y ago[flagged]
- Ldorigo 3y agoI'm surprised no one mentioned LibreOffice Draw - it doesn't always work perfectly (I guess it doesn't support some parts of the spec), but when it does, it's by far the most powerful pdf editor I found allowing to do things like move elements around, edit them (as in actually edit, not just annotate), etc. It's cross platform and FOSS. For page-level edits (rotating, reordering etc) pdftk in the cli (+ChatGPT to find the right incantations) works very well.
- dpacmittal 3y agoYeah, libreoffice draw and inkscape are usually my go to tools for editing pdf.
- cyanydeez 3y agoinkscape works well for single pages. The problems with PDFs I encounter, however, are large scale 1000 page PDFs that compile PDFs from multiple sources that clearly have multiple different types of encodings, fonts, etc. I'd love to have a pipeline that properly 'shrinks' everything. Not sure thats what this thing does, but it looks like they're moving towards configuring pipelines that could get there.
- niutech 3y agoHave you tried FileOptimizer (https://nikkhokkho.sourceforge.io/static.php?page=FileOptimizer https://nikkhokkho.sourceforge.io/static.php?page=FileOptimi...) for shrinking their size?
- alex_suzuki 3y agoSmallpdf [1] probably deserves a mention here. Not OSS and not self-hosted, but I‘ve used it occasionally and it has always worked really well. When I was running an agency, we inherited their first office – very cool folks. [1] https://smallpdf.com/ https://smallpdf.com/
- buryat 3y agodamn, that's a huge team https://smallpdf.com/about https://smallpdf.com/about
- gnyman 3y agoI'm not surprised... I mean just the the specification for PDF 1.7 is what ~1300 pages ? And then there is 2.0, and all the extensions [1] And multiply that with the number of implementations. If the goal is to make something that "always" works, you probably need a big team to keep up with the moving field of various bugs and reimplementations [1] https://www.loc.gov/preservation/digital/formats/fdd/fdd000030.shtml https://www.loc.gov/preservation/digital/formats/fdd/fdd0000...
- marwis 3y agoLooks like the pdf-lib.js used by the project can do most of the advertised features right in the browser and there is even a wasm build of tesseract out there. Have you considered making serverless/browser-only version?
- Froodle 3y agoYes our v2 version we are working on is this! We plan to completely migrate functionality to be all client with a server side one for API requests as well
- nirav72 3y agoAny recommendations for a desktop/cli PDF optimization tool that will reduce the size of a pdf? I've tried few and the best one so far is the one that is included in the subscription version of Adobe Acrobat. But I only need it occasionally and is not worth paying $20/month sub.
- niutech 3y agoCheck out FileOptimizer (https://nikkhokkho.sourceforge.io/static.php?page=FileOptimizer https://nikkhokkho.sourceforge.io/static.php?page=FileOptimi...)
- aidos 3y agoGhostscript maybe? Depends on what you’re doing but it can downsample images etc.
- nirav72 3y agoYes, its mainly to reduce image size for scanned documents. I'll give Ghostscript a try.
- aidos 3y agoSomething like this is probably a good starting point: ghostscript -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf From this gist https://gist.github.com/guifromrio/6390547# https://gist.github.com/guifromrio/6390547#
- nirav72 3y agoVery helpful tip. Thank you! - Ran it through GS and I got 30% reduction in a 50mb pdf file. I think if I play around with some options - such as converting images to grayscale, I might be able to reduce it by another 10-20%.
- 3y ago
- nf3 3y agoAs long as I can fill in forms and add a signature I'm sold. I loved being able to do this on MacOS but now that I'm on Linux I still haven't found any app that can do this.
- thebiglebrewski 3y agoFirefox can actually do this as long as your signature is in an image file.
- meridion 3y agoI just released a minimal browser-based PDF editor intended for your exact usecase - https://github.com/photown/private-pdf https://github.com/photown/private-pdf Let me know what you think!
- c0mbonat0r 3y agoreminds me of smallpdf.com but open source
- tbarbe 3y agoI did a small only-front app for that, it's open source if you want to check it (disclaimer: im not a front end dev, the ui is not good) https://timothebarbe.github.io/pdfModer/ https://timothebarbe.github.io/pdfModer/
- bobse 3y ago[dead]
- deleted 3y ago[deleted]
- codethief 3y agoAre there any plans to offer a CLI, as well?
- Froodle 3y agoNo there is a API instead, no CLI planned
- meridion 3y agoIn case you are looking for a simple entirely in-browser PDF editor, I just released PrivatePDF - https://github.com/photown/private-pdf https://github.com/photown/private-pdf It supports basic operations such as filling forms, inserting text, images, etc. You can test it out with a sample PDF here - https://photown.github.io/private-pdf/?pdf=https://raw.githubusercontent.com/photown/private-pdf/09b3a899cbce5ba2d5241110e944139d7f7e161a/readme/sample.pdf https://photown.github.io/private-pdf/?pdf=https://raw.githu...
- Mycromanage 3y agoLooks cool! ty! Checking it out!
- niutech 3y agoAs for self-hosted web apps, Tabula (https://tabula.technology https://tabula.technology) is a great tool to extract tables from PDF files.