1 / 16

Printing 101

Printing 101. SWHIG Seminar Ian Kim 1/18/12. Introduction. General overview of printing technology Background information: Vector vs. raster graphics How inkjet printers work Application: PostScript and PDF How PostScript and PDF are understood by printers

tola
Download Presentation

Printing 101

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Printing 101 SWHIG Seminar Ian Kim 1/18/12

  2. Introduction • General overview of printing technology • Background information: • Vector vs. raster graphics • How inkjet printers work • Application: PostScript and PDF • How PostScript and PDF are understood by printers • Understanding printing requires a change in perspective • Not the same thing as pixels on a monitor!

  3. Vector vs. Raster Graphics • Key idea in understanding printing • Font rendering • Graphic design • Most work with raster graphics • JPEGs, PNGs, GIFs… • The disadvantage? Limited resolution • Vector graphics: scalable to any resolution • Extensively utilized in printing for this reason: images stay crisp even when printed at high res • Font rendering is done with vector graphics • Inexact scaling: font hints

  4. Vector vs. Raster Comparison • Picture is described by mathematical functions • Can be scaled to any resolution • Scaling up image does not change its look • Geometric transforms do not reduce level of detail in image • Picture is described by an array of pixels • Has one limited, “native” resolution • Scaling up the image results in stretching • Geometric transforms can cause generation loss Vector graphics Raster graphics

  5. Examples of Vector Graphics Left: a comparison between vector and raster graphics. When zoomed-in, the raster version loses detail whereas the vector version does not. Above: an example of a Béziercurve, a common primitive used in vector graphics. Source: Wikimedia Commons

  6. DPI, PPI, and Units of Measure • Computer pixels do not have a direct correspondence with ink dots on a page • Measure of pixels on a screen: pixels per inch (PPI) • For example, 96 PPI is standard in Windows • Reason? Limited inkjet printer color palette • Ever heard of CMYK? (But sometimes more) • Use dithering to get more colors • This requires many ink dots for a single pixel • Measure of this ink dot density: dots per inch (DPI) • Don’t confuse DPI and PPI!

  7. DPI / PPI Illustration The method printers use to output the full array of colors of a computer pixel using just the CMYK colors is called dithering. The image uses just red and blue, but as the density increases the pattern is interpreted as solid purple. Often this requires quite a few dots to pull off. The example at left measures ~0.25”x0.25”, and is about 150 DPI. The individual ink dots are visible. Above: Differences between pixelson a computer screen and how they are printed by a typical inkjet printer. Source: Wikimedia Commons

  8. Overview of PostScript • PostScript: a programming language used to describe the layout of a page • Contains control structures, is Turing-complete… • Heavily stack based • Functions pop arguments off stack, push return values onto stack • Even objects are pushed onto the stock and popped off all at once to display the page • These characteristics will be important later! • De facto standard for page description • Slowly being phased out in favor of native PDF

  9. History of PostScript • Originally each printer had its own printer language • Primitive example: ASCII with control characters to tell the printer how to print the plaintext • Not portable, and hard to guarantee desired output • Each language was device-specific • PostScript allowed portability & reliability • Device-independent page description • Consistency of results across devices • Similar to the motivation behind development of high-level programming languages

  10. PostScript and Printers • PostScript input is interpreted by a raster image processor (RIP) • Originally, this used to be contained within printers • Powerful processors • Very expensive (1984 LaserWriter: $3500) • Nowadays, pages can be rendered on the computer then sent to a “dumb” printer (cheaper!) • Name comes from rasterization: rendering vector graphics into a raster image • Convert PostScript input (vectors) to printed output (raster)

  11. Example of PostScript Code %!PS /Courier % name the desired font 20 selectfont % choose the size in points and establish % the font as the current one 72 500 moveto % position the current point at % coordinates 72, 500 (the origin is at the % lower-left corner of the page) (Hello world!) show % stroke the text in parentheses showpage % print all on the page Displays “Hello world!” on a new page.

  12. Problems with PostScript • PostScript, as a programming language, makes rendering pages difficult • Implicit global state: can’t jump pages • Variables, control flow statements • Stack-based computation • No instant feedback to changes • Need to push everything onto the stack, then render page • Computationally expensive • Printers had better processors than the PCs!

  13. Encapsulated PostScript • Encapsulated PostScript (EPS) was introduced to address these problems • Contains an encapsulated bitmap “preview” of the accompanying PS code • Forbids the use of global-state modification and control flow statements • Has a well-defined BoundingBox element • Allowed PCs to see PS code output without rendering it • Predecessor to Portable Document Format (PDF)

  14. Portable Document Format (PDF) • Based on PostScript technology • Both were developed by Adobe • Not a replacement for PostScript! • But is a replacement for EPS files • Example: PostScript was used to print PDF output • Now, native PDF printers exist • PostScript is a programming language; PDF is a generalized container format • Hyperlinks, images, fonts… • You can even embed movies into PDF documents! (Why you would want to is another question)

  15. Advantages of PDF • Embedded fonts • Fixes font compatibility issues • Transparency support • PDF objects are PostScript objects that have already been interpreted by a RIP • Eliminates need for preview images • Objects can be more intuitively manipulated • Pages can be accessed in arbitrary order • More consistency from screen-to-paper • PDF provides greater reliability and consistency • Mistakes in the printing world are expensive!

  16. Summary • Printing: conceptual differences • Drawn in terms of vectors, then converted to raster • A screen pixel doesn’t equal a dot • PostScript: “high-level” printing • Brought together device-specific printing languages • Still used today by printers to print documents • Next step: PDF • Eliminates need for Encapsulated PostScript • Extensible container for other kinds of content • Not just confined to a physical page anymore

More Related