Skip to main content
Participating Frequently
February 8, 2013
Answered

current page information

  • February 8, 2013
  • 1 reply
  • 2351 views

Do we have any method/procedure to capture the current page information in printer. after painting before rendering ?

This topic has been closed for replies.
Correct answer Dr.Adam

And still you can't pick up the image in Postscript, you must have aRIP designed to save the image file.


If your EPS/PS output has only victors (lines , curves , circles , rectangular  etc)

you can simply construct your output as path(s) and Postscript has command to save the user path(s)  into different variable names

This is a possible  way to save the graphic contents of one page to another !

If you want to save the raster image generated it would be impossible as other users advised.

Adam.

1 reply

Participating Frequently
February 8, 2013

What, exactly, are you looking for? If you want page-device details (page size and the like), you can fetch those with a call to currentpagedevice, which leaves a dictionary on the stack containing the current pagedevice parameters. Thus,

    currentpagedevice /PageSize get

would leave on the stack an array containing the current width and height of the page.

There are lots of PostScript operators that query for page and graphics state parameter: current matrix, currentlinewidth, etc. Look in the PostScript Language Reference Manual for operators whose names begin with "current" and you'll see them all.

Or are you looking for something different that what I'm assuming here?

- John

----

John Deubert

Acumen Training

PostScript & PDF training & consulting

john@acumentraining.com

www.acumentraining.com

Participating Frequently
February 8, 2013

Hi john,

Thanks,

Actual requirement is like this.. i need to store the output image (contone) from interpreter ie before rendering(before converting contone to halftone).

I hope Entire page rendered in showpage procedure. If i redefine the procedure can i able to get the contone image. If so can you help me to redefine the showpage procedure?

Regards,

Sudhagar

Participating Frequently
February 8, 2013

Hi, Sudhagar -

So, if I understand you correctly, you'd like to obtain the image of the full rendered page (the page buffer contents) before it is sent to the marking engine for transfer to the paper (or whatever the print medium is). Is that correct?

If so, there's no command in the PostScript language that will do that; this is on purpose, since Adobe didn't want people hijacking its renderer output for use in non-Adobe printing devices.

If you are constrained to working with the RIP built into a printer, you may be out of luck. I suspect this is impossible using any in-printer RIP, since it'd be in a printer manufacturer's best interest to prevent you from accessing the page image that they have so painfully learned how to render well. It's also worth noting that not all printers will have a page buffer; many printers defer rendering the page until "showpage" time and then render it one strip at a time.

All that said, I'm reasonably certain this is possible with GhostScript, though I'm not enough of a GhostScript guru to tell you how its done. You could also get a work-around result by using Acrobat to convert the PostScript to PDF and then save the PDF as an image. Kludgy, perhaps, but perhaps may be done automatedly with appropriate scripting.

I'm not sure this helped. Or have I again spent time answering the wrong question? (Gave me something to do with an idle moment, anyway.)

- J

----

John Deubert

Acumen Training

PostScript & PDF training & consulting

john@acumentraining.com

www.acumentraining.com