Breaking
April 24, 2025

From PostScript to PDF Al Williams | usagoldmines.com

There was a time when each and every printer and typesetter had its own quirky language. If you had a wordprocessor from a particular company, it worked with the printers from that company, and that was it. That was the situation in the 1970s when some engineers at Xerox Parc — a great place for innovation but a spotty track record for commercialization — realized there should be a better answer.

That answer would be Interpress, a language for controlling Xerox laser printers. Keep in mind that in 1980, a laser printer could run anywhere from $10,000 to $100,000 and was a serious investment. John Warnock and his boss, Chuck Geschke, tried for two years to commercialize Interpress. They failed.

So the two formed a company: Adobe. You’ve heard of them? They started out with the idea of making laser printers, but eventually realized it would be a better idea to sell technology into other people’s laser printers and that’s where we get PostScript.

Early PostScript and the Birth of Desktop Publishing

PostScript is very much like Forth, with words made specifically for page layout and laser printing. There were several key selling points that made the system successful.

First, you could easily obtain the specifications if you wanted to write a printer driver. Apple decided to use it on their LaserWriter. Of course, that meant the printer had a more powerful computer in it than most of the Macs it connected to, but for $7,000 maybe that’s expected.

Second, any printer maker could license PostScript for use in their device. Why spend a lot of money making your own when you could just buy PostScript off the shelf?

Finally, PostScript allowed device independence. If you took a PostScript file and sent it to a 300 DPI laser printer, you got nice output. If you sent it to a 2400 DPI typesetter, you got even nicer output. This was a big draw since a rasterized image was either going to look bad on high-resolution devices or have a huge file system in an era where huge files were painful to deal with. Even a page at 300 DPI is fairly large.

If you bought a Mac and a LaserWriter you only needed one other thing: software. But since the PostScript spec was freely available, software was possible. A company named Aldus came out with PageMaker and invented the category of desktop publishing. Adding fuel to the fire, giant Lionotype came out with a typesetting machine that accepted PostScript, so you could go from a computer screen to proofs to a finished print job with one file.

If you weren’t alive — or too young to pay attention — during this time, you may not realize what a big deal this was. Prior to the desktop publishing revolution, computer output was terrible. You might mock something up in a text file and print it on a daisy wheel printer, but eventually, someone had to make something that was “camera-ready” to make real printing plates. The kind of things you can do in a minute in any word processor today took a ton of skilled labor back in those days.

Take Two

Of course, you have to innovate. Adobe did try to prompt Display PostScript in the late 1980s as a way to drive screens. The NeXT used this system. It was smart, but a bit slow for the hardware of the day. Also, Adobe wanted licensing fees, which had worked well for printers, but there were cheaper alternatives available for displays by the time Display PostScript arrived.

In 1991, Adobe released PostScript Level 2 — making the old PostScript into “Level 1” retroactively. It had all the improvements you would expect in a second version. It was faster and crashed less. It had better support for things like color separation and handling compressed images. It also worked better with oddball and custom fonts, and the printer could cache fonts and graphics.

Remember how releasing the spec helped the original PostScript? For Level 2, releasing it early caused a problem. Competitors started releasing features for Level 2 before Adobe. Oops.

They finally released PostScript 3. (And dropped the “Level”.) This allowed for 12-bit colors instead of 8-bit. It also supported PDF files.

PDF?

While PostScript is a language for controlling a printer, PDF is set up as a page description language. It focuses on what the page looks like and not how to create the page. Of course, this is somewhat semantics. You can think of a PostScript file as a program that drives a Raster Image Processor (RIP) to draw a page. You can think of a PDF as somewhat akin to a compiled version of that program that describes what the program would do.

Up to PDF 1.4, released in 2001, everything you could do in a PDF file could be done in PostScript. But with PDF 1.4 there were some new things that PostScript didn’t have. In particular, PDFs support layers and transparency. Today, PDF rules the roost and PostScript is largely static and fading.

What’s Inside?

Like we said, a PostScript file is a lot like a Forth program. There’s a comment at the front (%!PS-Adobe-3.0) that tells you it is a PostScript file and the level. Then there’s a prolog that defines functions and fonts. The body section uses words like moveto, lineto, and so on to build up a path that can be stroked, filled, or clipped. You can also do loops and conditionals — PostScript is Turing-complete. A trailer appears at the end of each page and usually has a command to render the page (showpage), which may start a new page.

A simple PostScript file running in GhostScript

A PDF file has a similar structure with a %PDF-1.7 comment. The body contains objects that can refer to pages, dictionaries, references, and image or font streams. There is also a cross-reference table to help find the objects and a trailer that points to the root object.  That object brings in other objects to form the entire document. There’s no real code execution in a basic PDF file.

If you want to play with PostScript, there’s a good chance your printer might support it. If not, your printer drivers might. However, you can also grab a copy of GhostScript and write PostScript programs all day. Use GSView to render them on the screen or print them to any printer you can connect to. You can even create PDF files using the tools.

For example, try this:


%!PS
% Draw square
100 100 moveto
100 0 rlineto
0 100 rlineto
-100 0 rlineto
closepath
stroke

% Draw circle
150 150 50 0 360 arc
stroke

% Draw text "Hackaday" centered in the circle
/Times-Roman findfont 12 scalefont setfont % Choose font and size
(Hackaday) dup stringwidth pop 2 div % Calculate half text width
150 exch sub % X = center - half width
150 % Y = vertical center
moveto
(Hackaday) show

showpage

If you want to hack on the code or write your own, here’s the documentation. Think it isn’t really a programming language? [Nicolas] would disagree.

 

This articles is written by : Nermeen Nabil Khear Abdelmalak

All rights reserved to : USAGOLDMIES . www.usagoldmines.com

You can Enjoy surfing our website categories and read more content in many fields you may like .

Why USAGoldMines ?

USAGoldMines is a comprehensive website offering the latest in financial, crypto, and technical news. With specialized sections for each category, it provides readers with up-to-date market insights, investment trends, and technological advancements, making it a valuable resource for investors and enthusiasts in the fast-paced financial world.

Recent:

A Bicycle is Abandonware Now? Clever Hack Rescues Dead Light Jenny List | usagoldmines.com

Haptic Soft Buttons Speak(er) to Your Sense of Touch Tyler August | usagoldmines.com

The Mohmmeter: A Steampunk Multimeter Matt Varian | usagoldmines.com

C64 Assembly in Parts Al Williams | usagoldmines.com

Improved and Open Source: Non-Planar Infill for FDM Heidi Ulrich | usagoldmines.com

Abusing DuckDB-WASM To Create Doom In SQL Maya Posch | usagoldmines.com

The Evertop: a Low-Power, Off-Grid Solar Gem Heidi Ulrich | usagoldmines.com

FLOSS Weekly Episode 830: Vibes Jonathan Bennett | usagoldmines.com

Open Source Commercial Synthesisers You Will Love Jenny List | usagoldmines.com

To See Within: Detecting X-Rays Dan Maloney | usagoldmines.com

Unsolved Questions in Astronomy? Try Dark Matter! Tyler August | usagoldmines.com

A Scratch-Built Commodore 64, Turing Style Dan Maloney | usagoldmines.com

Virtual Nodes, Real Waves: a Colpitts Walkthrough Heidi Ulrich | usagoldmines.com

How Supercritical CO2 Working Fluid Can Increase Power Plant Efficiency Maya Posch | usagoldmines.co...

eInk PDA Revisited Fenix Guthrie | usagoldmines.com

DIY Record Cutting Lathe is Really Groovy Tyler August | usagoldmines.com

British Wartime Periscope: a Peek Into the Past Heidi Ulrich | usagoldmines.com

Game Boy PCB Assembled With Low-Cost Tools Bryan Cockfield | usagoldmines.com

27% of Bybit Hacked Funds Have ‘Gone Dark’ After Flowing Through Mixers and Bridges, According to CE...

Why Physical Media Deserved To Die Maya Posch | usagoldmines.com

What’s Sixty Feet Across and Superconducting? Tyler August | usagoldmines.com

Making A One-Of-A-Kind Lime2 SBC Matt Varian | usagoldmines.com

Making Your Own Light Bulb Using a Jar, a Pencil, and Two Bolts John Elliot V | usagoldmines.com

PoX: Super-Fast Graphene-Based Flash Memory Maya Posch | usagoldmines.com

Jolly Wrencher Down to the Micron Ian Bos | usagoldmines.com

Trekulator: A Reproduction of the 1977 Star Trek Themed Calculator John Elliot V | usagoldmines.com

Remembering UCSD p-System, the Pascal Virtual Machine Maya Posch | usagoldmines.com

Keebin’ with Kristina: the One with the Part Picker Kristina Panos | usagoldmines.com

Crypto Rug Pull Losses Have Soared 6,499% This Year Despite Decrease in Frequency, Says DappRadar Rh...

Restoration of Six-Player Arcade Game From the Early 90s Bryan Cockfield | usagoldmines.com

Biasing Transistors with Current Sources John Elliot V | usagoldmines.com

Printed Perpetual Calendar Clock Contains Clever Cams Tyler August | usagoldmines.com

Preventing Galvanic Corrosion in Water Cooling Loops Maya Posch | usagoldmines.com

China Hosts Robot Marathon Al Williams | usagoldmines.com

Hackaday Links: April 20, 2025 Dan Maloney | usagoldmines.com

milliForth-6502, a Forth for the 6502 CPU John Elliot V | usagoldmines.com

The Most Printable 3D Printer Yet Aaron Beckendorf | usagoldmines.com

Low Cost Oscilloscope Gets Low Cost Upgrades Bryan Cockfield | usagoldmines.com

Building a Custom Zynq-7000 SoC Development Board from the Ground Up John Elliot V | usagoldmines.co...

Non-planar Slicing is for the Birds Tyler August | usagoldmines.com

Rockbox 4.0 Released John Elliot V | usagoldmines.com

Frankenflair 58: Manual Roots, Advanced Brew Matt Varian | usagoldmines.com

China’s TMSR-LF1 Molten Salt Thorium Reactor Begins Live Refueling Operations Maya Posch | usagoldmi...

They Hacked a Nuclear Power Plant! Whoops! Don’t Make a Sound! John Elliot V | usagoldmines.com

Controversial Exchange eXch To Shutter in May Amid Allegations the Project Laundered Crypto Stolen i...

$100,000 Drained From Bank Accounts At Wells Fargo, Bank of America and Other US Banks in One US Cou...

Hydroplaning RC Jet boat Steers Clear of Convention Seth Mabbott | usagoldmines.com

100,000 Americans Exposed As Auto Giant Warns Customers’ Names, Contact Details, Credit Card Informa...

JPMorgan Chase, BNY Mellon Respond To Major Data Breach After Bank Regulator Abruptly Suffers Securi...

Vibing, AI Style Elliot Williams | usagoldmines.com

Will it Run Llama 2? Now DOS Can Tyler August | usagoldmines.com

Open Source DMR Radio Al Williams | usagoldmines.com

Restoring an Abandoned Game Boy Kiosk Maya Posch | usagoldmines.com

Haircuts in Space: How to Keep Your Astronauts Looking Fresh Maya Posch | usagoldmines.com

Robot Picks Fruit and Changes Light Bulbs with Measuring Tape Tyler August | usagoldmines.com

A Pi-Based LiDAR Scanner Bryan Cockfield | usagoldmines.com

Vintage Game Rides Again Thanks to Modern Tech Dan Maloney | usagoldmines.com

Hackaday Podcast Episode 317: Quantum Diamonds, Citizen Science, and Cobol to AI Al Williams | usago...

Presence Detection Augments 1930s Home Bryan Cockfield | usagoldmines.com

This Week in Security: No More CVEs, 4chan, and Recall Returns Jonathan Bennett | usagoldmines.com

D20-shaped Quasicrystal Makes High-Strength Alloy Printable Tyler August | usagoldmines.com

Track Your Circuits: A Locomotive PCB Badge Matt Varian | usagoldmines.com

Tiny, Hackable Telepresence Robot for under $100? Meet Goby Donald Papp | usagoldmines.com

Rise of the Robots: How Robots Are Changing Dairy Farms Maya Posch | usagoldmines.com

A Blacksmith Shows Us How To Choose An Anvil Jenny List | usagoldmines.com

Designing an FM Drum Synth from Scratch Dan Maloney | usagoldmines.com

Bicycle Gearbox Does it by Folding Fenix Guthrie | usagoldmines.com

Supercon 2024: Exploring the Ocean with Open Source Hardware Tom Nardi | usagoldmines.com

Budget Schlieren Imaging Setup Uses 3D Printing to Reveal the Unseen Tyler August | usagoldmines.com

Modernizing an Enigma Machine Matt Varian | usagoldmines.com

Using a MIG Welder, Acetylene Torch, and Air Hammer to Remove a Broken Bolt John Elliot V | usagoldm...

An Absolute Zero of a Project Dan Maloney | usagoldmines.com

GK STM32 MCU-Based Handheld Game System Maya Posch | usagoldmines.com

Making a Variable Speed Disc Sander from an Old Hard Drive John Elliot V | usagoldmines.com

FLOSS Weekly Episode 829: This Machine Kills Vogons Jonathan Bennett | usagoldmines.com

SpaceMouse Destroyed for Science Fenix Guthrie | usagoldmines.com

Porting COBOL Code and the Trouble With Ditching Domain Specific Languages Maya Posch | usagoldmines...

Homemade VNA Delivers High-Frequency Performance on a Budget Dan Maloney | usagoldmines.com

Binner Makes Workshop Parts Organization Easy Matt Varian | usagoldmines.com

Something is Very Wrong With the AY-3-8913 Sound Generator Maya Posch | usagoldmines.com

Replica of 1880 Wireless Telephone is All Mirrors, No Smoke Tyler August | usagoldmines.com

DIY AI Butler Is Simpler and More Useful Than Siri Donald Papp | usagoldmines.com

Making Parts Feeders Work Where They Weren’t Supposed To Lewin Day | usagoldmines.com

A New Kind of Bike Valve? Fenix Guthrie | usagoldmines.com

Announcing the Hackaday Pet Hacks Contest Elliot Williams | usagoldmines.com

New Brymen Bluetooth BM788BT Digital Multimeter Coming Soon John Elliot V | usagoldmines.com

Keebin’ with Kristina: the One with John Lennon’s Typewriter Kristina Panos | usagoldmines.com

Shine On You Crazy Diamond Quantum Magnetic Sensor Dan Maloney | usagoldmines.com

This Potato Virtual Assistant is Fully Baked Seth Mabbott | usagoldmines.com

Building A DIY Tornado Tower Lewin Day | usagoldmines.com

Plasmonic Modulators Directly Convert Terahertz Waves to Optical Signals Maya Posch | usagoldmines.c...

Elastic Bands Enable Touchable Volumetric Display Aaron Beckendorf | usagoldmines.com

ESP32-Powered Clock Brings Aviation Style To Your Desk Lewin Day | usagoldmines.com

Cybercriminals Hijacking Popular Crypto Software To Steal Digital Assets From Wallets: Security Rese...

Converting the C64 Mini Into A C64C Lewin Day | usagoldmines.com

Linux Fu: Stopping a Runaway Al Williams | usagoldmines.com

A Cheap Yellow Display Makes A Video Walkie Talkie Jenny List | usagoldmines.com

Jenny’s (Not Quite) Daily Drivers: Raspberry Pi 1 Jenny List | usagoldmines.com

DIY scanning spectrometer is a bright idea Tyler August | usagoldmines.com

A Tricky Commodore PET Repair and a Lesson About Assumptions Maya Posch | usagoldmines.com

Leave a Reply