Live data from Hacker News

Show HN: Make Your PDF Look Scanned

scanyourpdf.com

121–130 of 177 posts

Re: Show HN: Make Your PDF Look Scanned

#122
post #73

Earlier quoted context omitted.

I've sent many suggestions to the Kindle people of things they could improve on the Kindle, all of which were very simple to do. The years go by, they've done exactly 0 of them. One of them, for example, was an option to eliminate the margin in a pdf display. The pdf already has a margin, so there's the pdf margin plus the margin the ereader puts around the pdf. This significantly reduces the number of pixels display…

Making PDF display better doesn't make them any money.

More likely, there are multiple sev5 issues for it in the ticket system that nobody will ever get around to implementing.

Re: Show HN: Make Your PDF Look Scanned

#123
post #105

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…

Try this one-line ImageMagick command to make COMPACT pseudo-scanned files: convert -density 150 ORIGINAL.pdf -colorspace gray +noise Gaussian -rotate 0.5 -depth 2 SCANNED.pdf Consider using `-depth 1`, `-depth 3` as a final parameter to map colors to only 2¹=2 or 2³=8 instead of 2²=4 gray levels. Using a small number of gray levels SIGNIFICANTLY reduces file size and also gives your pseudo-scanned document a more pi…

Rather than making a COMPACT version, your command created a file over twice the size of one created using the aforementioned

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

However, that may be a useful feature, since many users end up inadvertently creating very large PDFs when scanning.

Re: Show HN: Make Your PDF Look Scanned

#124
post #70

Earlier quoted context omitted.

That's beyond absurd. The content of the document is what determines whether it's falsified or not, and you can inspect the content for inconsistencies on a generated PDF far more easily than a scanned one.

In this case I think it’s the business auditors (pwc etc) assuring “best practices” that will satisfy the regulators and thus the regulatory auditors (Federal reserve, treasury, FDIC...). Banks are themselves full of absurd practices but in this one tiny area I’d give them a pass.

Yes, this is a lawyers version of a patch to fix bugs that programmers sometimes introduce.

A couple of years ago I used DocuSign on a contract, and the PDF “copy” I was emailed as a receipt had different terms than the one I actually signed.

Luckily I did not object to the discrepancy, but I would have wondered what would have actually happened if I did.

Re: Show HN: Make Your PDF Look Scanned

#125
post #6
post #4

Haha, great job. There's also something to be said for the grim humour of how technology led us to this point. Sadly, I'd also be extremely wary of sending the kind of documents that I need to print out and sign through some server-side black box.

Thanks, I totally agree. That's why I made the code public so you can see what's being run. A friend very privacy-minded told me maybe a desktop app could be used by those who don't want to upload their documents so that's something I'm currently exploring

> made the code public so you can see what's being run

The thing is, sharing a repository does not prove that the server is running that same code. And someone worried about their document security wouldn't run some random binary locally either, because it could send the document off to a server. They would run the source code locally after reading it, which sharing the repository allows for.

Re: Show HN: Make Your PDF Look Scanned

#126
post #74

What are the legitimate uses of this? The only uses I can think of are less than kosher.

People who require "print, sign, scan" do so for the purpose of avoiding forgery, not because they benefit from any other aspect of the procedure. So long as you aren't putting someone else's signature onto the document, everything is kosher because you've deprived them of nothing given that forgery was successfully avoided.

It's like if all devices in your house have no internet connection, and your ISP support rep asks you to reboot your computer. You say "Ok it just rebooted" without rebooting because the reason for the procedure is simply to ensure that it's not an issue local to one device, and you have ensured that for them (albeit by alternative means).

Re: Show HN: Make Your PDF Look Scanned

#127
post #112

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…

For other noobish windows users like myself, you can simply dump the following into a bat file. When run, it'll look for a file called "scanThis.pdf" and apply the conversion with ImageMagick. IF EXIST scanThis.pdf (magick convert -density 100 scanThis.pdf -colorspace gray +noise Gaussian -rotate 0.5 -depth 2 SCANNED.pdf) ELSE (ECHO File scanThis.pdf not found & PAUSE)

Sorry, I'm a long term Windows user but not very proficient. That can't be there entire contents of the bat file, can it? What else goes in there?

Re: Show HN: Make Your PDF Look Scanned

#128

Earlier quoted context omitted.

It's still far short of being suitable for use of any private documents. https://github.com/baicunko/scanyourpdf/blob/master/pdfwebsi... This is rather less than secure; output files are named, e.g., "Scan_2020512_{four random lower-case letters}.pdf" into a web-server-readable directory. That gives a total of 456976 different possible filenames on a day. It's more than feasible to brute-force that many filenames in…

Thank you for the comments. I agree with you, I will decrease how long the file is in the server (I just hit 40gb from hacker news) as well as implement rate limiting to prevent any brute force

https://docs.python.org/3/library/tempfile.html

  >>> tempfile.mkstemp(suffix='.pdf')
  (4, '/tmp/tmp0g7l3uq7.pdf')
one could take it a step further...

  >>> tempfile.mkstemp(suffix='.pdf', prefix=uuid.uuid4().hex)
  (5, '/tmp/7b7881400a2348bfae63d37b970d4489pqhz_1g2.pdf')

Re: Show HN: Make Your PDF Look Scanned

#129
post #112

Earlier quoted context omitted.

For other noobish windows users like myself, you can simply dump the following into a bat file. When run, it'll look for a file called "scanThis.pdf" and apply the conversion with ImageMagick. IF EXIST scanThis.pdf (magick convert -density 100 scanThis.pdf -colorspace gray +noise Gaussian -rotate 0.5 -depth 2 SCANNED.pdf) ELSE (ECHO File scanThis.pdf not found & PAUSE)

Sorry, I'm a long term Windows user but not very proficient. That can't be there entire contents of the bat file, can it? What else goes in there?

Nope that's it. The bat file here is just a clickable shortcut so you don't have to remember the whole command. The interesting stuff is happening in ImageMagick, which has to be installed already.

Re: Show HN: Make Your PDF Look Scanned

#130

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

i just tell people the dropbox app will scan docs for you. comes out looking like a photocopy. perfect for the bankers.
Post reply on HN