• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Print to Image

 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I need a progrsm or API that I can us to print from any application to amge. For example, I mean an image virtual printer that I can use to print to image instead of print to real printer.

Any help please.
Thank you,
 
Saloon Keeper
Posts: 28486
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
General printing to an image file isn't something you want to do if you can avoid it. If the content is primarily text, the image file would usually be much, much larger than the text equivalent, would require special software to display it, wouldn't support page breaks, and so forth.

When you do a "print to file" operation in Linux/Unix, the normal operation is that the printing code or application produces a PostScript (.ps) file. PostScript can contain images, but also provides a more efficient means of containing WYSIWYG text. In fact, PDF files are specialized extensions of PostScript. Typically if you have a bitmap image in a PDF, it will encode that image in TIFF form.

Although you can buy printers that print PostScript directly (one of the most famous of them was the Apple LaserWriter), Linux has the ability to convert from PostScript to any other Page Description Language, such as HP's PCL. There is an app for that. It's called GhostScript.

Among the output abilities of GhostScript are image files, so if you really want to print to a jpeg, bmp, gif, tiff, or whatever, there are drivers that will do that for you. See http://pages.cs.wisc.edu/~ghost/doc/AFPL/8.00/Devices.htm.
 
This will take every ounce of my mental strength! All for a tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic