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


Groups > comp.lang.postscript > #3289

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

Newsgroups comp.lang.postscript
Date 2018-08-04 07:10 -0700
References <pjv87o$q9s$1@reader1.panix.com>
Message-ID <43bfb5cc-97e7-4e99-badd-4e5276c2fb6f@googlegroups.com> (permalink)
Subject Re: ps viewer, like ViewerJS, that can embed an <iframe> in an html page
From luser droog <luser.droog@gmail.com>

Show all headers | View raw


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. 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. 

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.

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