Live data from Hacker News

Show HN: Make Your PDF Look Scanned

scanyourpdf.com

81–90 of 177 posts

Re: Show HN: Make Your PDF Look Scanned

#81

From the github repo, the site is a wrapper around exactly two shell commands. Instead of uploading your data to an untrusted site, you can run from the comfort and safety of your local computer: convert -density 150 input.pdf -colorspace gray -linear-stretch 3.5%x10% -blur 0x0.5 -attenuate 0.25 +noise Gaussian -rotate 0.5 temp.pdf gs -dSAFER -dBATCH -dNOPAUSE -dNOCACHE -sDEVICE=pdfwrite -sColorConversionStrategy=Lea…

pmiller2 linked[0] to some alternatives[1], including this one[2] which only requires ImageMagick:

convert letter.pdf -colorspace gray \( +clone -blur 0x1 \) +swap -compose divide -composite -linear-stretch 5%x0% -rotate 1.5 as-scanned.pdf

[0] https://news.ycombinator.com/item?id=23157979

[1] https://tex.stackexchange.com/questions/94523/simulate-a-sca...

[2] https://tex.stackexchange.com/a/94541/185219

Re: Show HN: Make Your PDF Look Scanned

#82
post #14

Impressed to see this is your first open source project! What a fantastic blend of simplicity, technology, and wit. I love it. Original (was PDF): https://i.imgur.com/v5nn1ql.png Processed: https://www.scanyourpdf.com/media/Scan_2020512_wegb.pdf

uploaded again: https://www.scanyourpdf.com/media/Scan_2020512_oqkk.pdf

Re: Show HN: Make Your PDF Look Scanned

#83

From the github repo, the site is a wrapper around exactly two shell commands. Instead of uploading your data to an untrusted site, you can run from the comfort and safety of your local computer: convert -density 150 input.pdf -colorspace gray -linear-stretch 3.5%x10% -blur 0x0.5 -attenuate 0.25 +noise Gaussian -rotate 0.5 temp.pdf gs -dSAFER -dBATCH -dNOPAUSE -dNOCACHE -sDEVICE=pdfwrite -sColorConversionStrategy=Lea…

In summary you could say yes but I wanted to simplify the process for the not-so-techy person. I will work on a Standalone app that simplifies the command and shows a nice GUI for more private documents

Re: Show HN: Make Your PDF Look Scanned

#84

Earlier quoted context omitted.

Rate limiting (if by that you mean at the firewall or the web server) is not the way to do it. That shifts the problem somewhere else in the stack, into a place that isn't under version control in the same repository. Consider: If you moved this on to another server, would you remember to enable rate limiting there? If someone else uses your code, will they know to enable rate limiting? Rate limiting isn't a bad idea…

thanks! took me quite a while to prepare as I read a bunch of other servers failing catastrophically when posting on HN due to the sheer amount of traffic. I will start working on your comments throughout the weekend, I agree with most of them. Would love for you to follow the github page for any other comments you may have, all are appreciated

It was while reading my above comments that I realised I should have shut up and contributed code instead, because that's definitely more helpful than being critical on HN, especially to a newcomer & their first project.

So that is what I've decided to do! First step: a PR coming out of getting this up and running on my Ubuntu box. :)

Re: Show HN: Make Your PDF Look Scanned

#85
post #81

From the github repo, the site is a wrapper around exactly two shell commands. Instead of uploading your data to an untrusted site, you can run from the comfort and safety of your local computer: convert -density 150 input.pdf -colorspace gray -linear-stretch 3.5%x10% -blur 0x0.5 -attenuate 0.25 +noise Gaussian -rotate 0.5 temp.pdf gs -dSAFER -dBATCH -dNOPAUSE -dNOCACHE -sDEVICE=pdfwrite -sColorConversionStrategy=Lea…

pmiller2 linked[0] to some alternatives[1], including this one[2] which only requires ImageMagick: convert letter.pdf -colorspace gray \( +clone -blur 0x1 \) +swap -compose divide -composite -linear-stretch 5%x0% -rotate 1.5 as-scanned.pdf [0] https://news.ycombinator.com/item?id=23157979 [1] https://tex.stackexchange.com/questions/94523/simulate-a-sca... [2] https://tex.stackexchange.com/a/94541/185219

I'd recommend GS after ImageMagick as IM will hugely increase the size of the output due to rasterization!

Re: Show HN: Make Your PDF Look Scanned

#86
post #5

Earlier quoted context omitted.

What do you mean "required"? Like, they wouldn't accept a clean, non-scanned copy? That's absurd.

Some types of documents/deeds do require "wet ink" signatures by law - https://www.lawsociety.org.uk/support-services/advice/articl...

7 years of being a digital nomad, and signing every document digitally, and I never ran into this. TIL.

Re: Show HN: Make Your PDF Look Scanned

#87

Earlier quoted context omitted.

You might want to just switch to a dotenv library. Quick Google for Django yielded https://github.com/jpadilla/django-dotenv

Dotenv libraries are just for dev and other similar environments. In production you should still use normal environment variables (or whatever system you use to load your configuration), as dotenv files stay on the filesystem and sometimes even committed to your SCM.

[deleted]

Re: Show HN: Make Your PDF Look Scanned

#90
post #81

Earlier quoted context omitted.

pmiller2 linked[0] to some alternatives[1], including this one[2] which only requires ImageMagick: convert letter.pdf -colorspace gray \( +clone -blur 0x1 \) +swap -compose divide -composite -linear-stretch 5%x0% -rotate 1.5 as-scanned.pdf [0] https://news.ycombinator.com/item?id=23157979 [1] https://tex.stackexchange.com/questions/94523/simulate-a-sca... [2] https://tex.stackexchange.com/a/94541/185219

I'd recommend GS after ImageMagick as IM will hugely increase the size of the output due to rasterization!

The above convert command produced credible output only 6KB larger than the input PDF in my limited testing.
Post reply on HN