[gopher] gopher++ (gopher1) protocol
Kim Holviala
kim at holviala.com
Mon Jan 11 12:48:55 UTC 2010
On 2010-01-11 14:29, Mateusz Viste wrote:
> You can't do any automated transcoding just like that. It's not that easy.
man 1 convert
ImageMagick handles image conversions just fine - I've used it before to
see images I didn't have viewer support for. LibC iconv() handles
charset conversions without any problems.
I agree that converting PDFs and videos is complicated, that's why the
document said "SHOULD" for those.
> The big problem about your whole transcoding stuff is that a transcoded
> document is not the same document anymore.
No, it's not. What's wrong with that? The client can easily get the
original resource if it so chooses (simply by not sending the Accept
header).
> Say, that I create a PDF
> document where most information is vector graphic. If the client ask for
> us-ascii text, an automated transcoding program will simply drop all
> things which are not bare text, and my PDF will look like crap.
True. But if a client asks for it to be converted to PNG it'll look just
fine. Reading the manual it seems that very same convert(1) will convert
PDFs to images.
[..]
I downloaded the first PDF I found from Google (2010 Form W-4) and
simply tried this (without reading the manpages):
[kimmy at t61 Desktop]$ convert fw4.pdf fw4.png
[kimmy at t61 Desktop]$ echo $?
0
[kimmy at t61 Desktop]$ ls -la *png
-rw-r--r-- 1 kimmy users 64563 2010-01-11 14:43 fw4-0.png
-rw-r--r-- 1 kimmy users 51280 2010-01-11 14:43 fw4-1.png
Now that wasn't too hard? Definately easier than coding PDF support into
the client. Now all the server has to do is to stitch those two images
together (there might have been a convert option for that too).
> That's why in my opinion, applying *any* automated transcoding is wrong.
> If I want my document to be readable by C64 owners, I will write it in a
> way that will allow that.
Except that, of course, you don't. Neither do I. We don't do it because
we just don't care. A theoretical C=64 user will care, though, but
that's his problem for not using the latest Firefox on a quad Xeon, right?
- Kim
More information about the Gopher-Project
mailing list