Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.postscript > #3290

Re: ps viewer, like ViewerJS, that can embed an <iframe> in an html page

From John Forkosh <forkosh@panix.com>
Newsgroups comp.lang.postscript
Subject Re: ps viewer, like ViewerJS, that can embed an <iframe> in an html page
Date 2018-08-04 15:17 +0000
Organization PANIX Public Access Internet and UNIX, NYC
Message-ID <pk4g2r$9nv$1@reader1.panix.com> (permalink)
References <pjv87o$q9s$1@reader1.panix.com> <43bfb5cc-97e7-4e99-badd-4e5276c2fb6f@googlegroups.com>

Show all headers | View raw


luser droog <luser.droog@gmail.com> wrote:
> On Thursday, August 2, 2018 at 10:33:12 AM UTC-5, John Forkosh wrote:
>> I'd like to display postscript files within <iframe>'s on my html pages,
>> pretty much exactly like I'm already doing for pdf files using
>>   https://viewerjs.org/
>> with a tag something like
>>   <iframe src="/ViewerJS/#../somefile.pdf" width=400 height=300></iframe>
>> Except I want that to be somefile.ps instead of .pdf
>> 
>> I know I could use ImageMagick convert somefile.ps somefile.pdf
>> (or similar), but these postscript files are being generated in
>> real time, and attempts using such converters actually take too
>> long, given our requirements.
> 
> From your response to John Reiser, I understand that the ps code is
> being produced by TeX.

Sorry, no. When I said "gs >>does<< work" (if that's what your
inference's based on), I meant that ps2pdf works doing the
eponymous ps-->pdf conversion. The input ps file itself is
generated by a compiled C program running as a cgi on the web.

> TeX generates code that exercises lots of corner
> cases in the PS standard and you'll really need a robust interpreter 
> to process that code. So it's unlikely that you're going to find an
> implementation in JavaScript that can do this. 

I don't really care about js, per se, just behavior similar to
that of https://viewerjs.org/  What I care about is the html page
that I have to write, where <iframe src="path/somefile.ps"></iframe>
is trivial to write. So a viewerjs-like tool for ps would be great.
I don't care at all (besides curiosity) about its internals; only that
it lets me write an <iframe> inside of which a ps file is displayed.

> If the input were a more limited set of postscript operators, then 
> handling that might be an appropriately sized JavaScript project for
> a small team in a short time. And you might find a few ps.js projects
> that already do the job within these kind of constraints. 
> 
> Another possibility exists. I haven't tried this but conceivably 
> ghostscript could be compiled with emscripten to produce an interpreter
> that runs in the browser. Stitching up all the ins and outs to make
> it really work is beyond my expertise.

Thanks, but no thanks:) Not looking to get involved in yet another
project. Just looking for something that already exists.
This is a tool as far as I'm concerned, just like a C compiler
is a tool, but that doesn't mean I want to get involved writing
either one.
-- 
John Forkosh  ( mailto:  j@f.com  where j=john and f=forkosh )

Back to comp.lang.postscript | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

ps viewer, like ViewerJS, that can embed an <iframe> in an html page John Forkosh <forkosh@panix.com> - 2018-08-02 15:33 +0000
  Re: ps viewer, like ViewerJS, that can embed an <iframe> in an html page John Reiser <vendor@BitWagon.com> - 2018-08-03 16:59 -0700
    Re: ps viewer, like ViewerJS, that can embed an <iframe> in an html page John Forkosh <forkosh@panix.com> - 2018-08-04 09:08 +0000
  Re: ps viewer, like ViewerJS, that can embed an <iframe> in an html page luser droog <luser.droog@gmail.com> - 2018-08-04 07:10 -0700
    Re: ps viewer, like ViewerJS, that can embed an <iframe> in an html page John Forkosh <forkosh@panix.com> - 2018-08-04 15:17 +0000
      Re: ps viewer, like ViewerJS, that can embed an <iframe> in an html page Eli the Bearded <*@eli.users.panix.com> - 2018-08-04 23:59 +0000
        Re: ps viewer, like ViewerJS, that can embed an <iframe> in an html page John Forkosh <forkosh@panix.com> - 2018-08-05 08:30 +0000
    Re: ps viewer, like ViewerJS, that can embed an <iframe> in an html page John Forkosh <forkosh@panix.com> - 2018-08-05 07:58 +0000
      Re: ps viewer, like ViewerJS, that can embed an <iframe> in an html page Jean-Francois Moine <moinejf@free.fr> - 2018-08-17 18:36 +0200
        Re: ps viewer, like ViewerJS, that can embed an <iframe> in an html page John Forkosh <forkosh@panix.com> - 2018-08-18 12:51 +0000
          Re: ps viewer, like ViewerJS, that can embed an <iframe> in an html page Jean-Francois Moine <moinejf@free.fr> - 2018-08-18 20:22 +0200
            Re: ps viewer, like ViewerJS, that can embed an <iframe> in an html page John Forkosh <forkosh@panix.com> - 2018-08-21 09:07 +0000

csiph-web