Viewing PDF's
Brian K. White
brian at aljex.com
Mon Aug 20 10:53:07 PDT 2012
On 8/20/2012 9:30 AM, scooter6 at gmail.com wrote:
> We're running CentOS and filePro 5.6.10R4
>
> End users login using putty (SSH) -- is there a way to build in a pdf
> viewer that users can use that will 'tunnel' over ssh/putty?
> (i.e. from a browse screen, doing a system call to evince or similar pdf
> viewer )
>
> I notice when using evince, I get 'cannot open display' error - but don't
> know how to assign the 'display' variable or if it's even possible?
>
> Thanks
>
> Scott
> PDM
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://mailman.celestial.com/pipermail/filepro-list/attachments/20120820/1538f22a/attachment.html
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> Subscribe/Unsubscribe/Subscription Changes
> http://mailman.celestial.com/mailman/listinfo/filepro-list
>
my customized version of putty has a run-program escape sequence, so you
can place the pdf in your servers htdocs and then send a run-program
code to putty to launch the url to the pdf.
http://code.google.com/p/aljex-client/
There is another version available from aljex.com if you want that is
the same as this, but also includes a feature rich quality twain scanner
utility that is free but not open source in the installer. Same exact
putty though so this one is fine even for "real" work until you want to
do document imaging.
That's all we do, just launch a url to the pdf.
There is one server-side part of the process that GREATLY simplifies
this though. I have a cron job that runs every minute that deletes all
files older than 2 minutes from a particular special temp directory.
It's a single command, just
"find /path/to/special/tmp ! -type d -mmin +2 -delete"
which assumes gnu find, but a similar process on an old sco box without
gnu find is only a couple of lines and just about as light weight.
Using -amin would technically be the most correct most ideal behavior vs
-mmin or -cmin, but -amin only actually works as expected if the
filesystem has atime enabled, which some distros disable by default
because it's disk/io expensive due to metatdata updates, and almost
nothing actually uses atime enough to justify the performance hit.
The result is you can "fire & forget"
From processing or scripts you can simply create the file in the
special temp directory (which you want to invent some new spot for, NOT
/tmp!) and then fire off the escape sequence to run the url to that
file, and that's it. You don't have to figure out how long to wait to
delete the file, or do any pausing to make sure the user got the file
before deleting etc. The users pc will start downloading it immediately,
and even if the file is huge and the pc is slow to react and the
connection is slow and it takes over 2 minutes to download, it doesn't
matter, all that matters is that the httpd started to read the file
within 2 minutes, once httpd opens the file for reading, it can continue
to read forever until it chooses to close the file. The delete cron job
will not break the ongoing download.
--
bkw
More information about the Filepro-list
mailing list