• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

current page information

New Here ,
Feb 08, 2013 Feb 08, 2013

Copy link to clipboard

Copied

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

TOPICS
Programming

Views

1.7K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Explorer , Feb 09, 2013 Feb 09, 2013

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.

Votes

Translate

Translate
Explorer ,
Feb 08, 2013 Feb 08, 2013

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 08, 2013 Feb 08, 2013

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 08, 2013 Feb 08, 2013

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 08, 2013 Feb 08, 2013

Copy link to clipboard

Copied

Hi john,

Thanks.

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

actually i need to capture the image before rendering....

Thanks,

Sudhagar

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 09, 2013 Feb 09, 2013

Copy link to clipboard

Copied

PostScript, by design, offers no access whatever to the graphical content of the page.  It makes less sense than you migh think to say "the image before rendering" since in many devices there is no image until rendering; often there is a display list; no intermediate image need exist. In devices which render without a display list there is absolutely no reason to hold a contone image, as each graphical element can be halftoned as it is specified. Where there is a display list it may be rendered asynchronously long after your program has finished. Whatever it is, it isn't available to you (unless a particular device offers a nonstandard extension.)

You would need a separate RIP set up to render contone images for you, you cannot exploit a print RIP as a side effect.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 09, 2013 Feb 09, 2013

Copy link to clipboard

Copied

looking for image before halftone. any how thanks.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 09, 2013 Feb 09, 2013

Copy link to clipboard

Copied

Get a RIP designed to RIP to contone.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 09, 2013 Feb 09, 2013

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 09, 2013 Feb 09, 2013

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines