PSF(1)

πŸ’– PSF(1) β€” the PostScript filter, bestie edition πŸ’–

okay so. this is psf, a PostScript filter, from the local manual section 1 (general commands). sit down, grab a strawberry πŸ“, we're gonna run your print job's whole life.


✨ SYNOPSIS ✨

psf [-p] [-olist] [-#N] [-r] [-mmessage] [-land] [-upside] [-2]
[-securityN[,message]] [-c] [-inputtrayN] [-outputtrayN] [-ips_ignore]
[-ips_fit] [-ips_error] [-noreport] [-sort[N]] [-duplex] [-noduplex]
[-tumble] [-selectstring] [-courierold] [-nondsc] [--] [file] ...

🌸 DESCRIPTION 🌸

so psf is your little glow-up filter for a PostScript program πŸ’…. you feed it PostScript, it messes with it in the most useful ways, and it hands you back something the printer actually vibes with.

it does all this by reading the Adobe structuring conventions β€” that's how it knows what's a page, what's a prologue, all of it. with those conventions on its side, psf can do stuff like:

  • select specific pages πŸ‘‘
  • change the page order
  • rotate pages
  • print multiple copies
  • use the printer's secondary paper input
  • print a message across every single page (yes, like a watermark, iconic)

the concatenated input files are assumed to form one PostScript program that conforms to the PS-Adobe-2.0 structuring conventions. and the output? also conforms to the same conventions. we keep it consistent, periodt. ✨

there's also the -p option, which lets you convert input files from text to PostScript before any of the further processing happens. text in, PostScript out, no cap.

πŸ’‘ okay bestie, important detail, don't skip: in all options where the variable part is written in italics, except the -sort option, that variable part does not have to be glued onto the option argument β€” it can just be the next argument instead. for example: psf -#1 and psf -# 1 do the exact same thing. same effect, same energy, two spellings. 🫢

πŸŽ€ OPTIONS πŸŽ€

  • -p β€” the exception to the rule, and she knows it. with this one, the input files get treated as printable text and shipped off to psprint(1) before any further processing goes down.
  • -olist β€” selects the pages named in the list. the list uses the same format as the troff(1) utilities, so you already know the vibe. list is a comma separated list of page numbers (N) and ranges (N1-N2). and here's the cute part β€” the initial or trailing number of a range can be left unspecified. neither the pages in the PostScript input nor the pages in the list need to be in order. chaos is allowed. example: -o-4,9,11-13,15- will make pages 1, 2, 3, 4, 9, 11, 12, 13, 15 and 16 of a 16 page document show up in the output. slay. ✨
  • -#N β€” prints N copies of every page. that's it, that's the tweet.
  • -r β€” reverses the page order. back it up, back it up πŸ”„
  • -mmessage β€” prints the message diagonally across each page, in point size 54 outline helvetica bold. yes, 54. big. bold. diagonal. main character energy. πŸ’…
  • -land β€” prints each page in landscape mode. i.e. rotated 90 degrees.
  • -upside β€” prints each page upside down πŸ™ƒ. assumes upright A4.
  • -2 β€” every page produced by the options and input files described above gets reduced by a factor √½. then each pair of consecutive pages gets printed side by side on a single page. two pages, one sheet, economy queen.
  • -securityN[,message] β€” this one is spicy πŸ”₯. it uses an OcΓ© specific PostScript operator that allows printing a document only if the printer receives security code N at its console. if that code isn't entered within 30 seconds, the document will not be printed. N must be a number in the range 0 .. 99999999. the optional message gets displayed on the OcΓ© console while it's waiting for the code to be entered. the default message is the user's login name.
  • -c β€” uses the secondary paperfeed mechanism. this means manualfeed on some machines and cassette on others. mystery box behavior, iykyk.
  • -inputtrayN β€” takes the input from inputtray N. the default input tray on most printers is set up by the system administrators. the -m may set the inputtray on some printers.
  • -outputtrayN β€” puts the output in outputtray N. most printers have output tray 0 as their default.
  • -ips_ignore β€” tells the printer to ignore any request for unavailable page sizes. heads up: the printer or printer manager might warn when this feature is used. and the results of using both this option and the -inputtray option are undefined. also this option can only be used on printers with PostScript Level 2.
  • -ips_fit β€” tells the printer to ignore any request for unavailable page sizes and scale the page images so they fit on the printed pages. the page images from the input are centered on the printed pages. same warning energy: the printer or printer manager might warn when this feature is used, and the results of using both this option and the -inputtray option are undefined. and again β€” PostScript Level 2 printers only.
  • -ips_error β€” makes the printer throw an error for unavailable page sizes and stop processing the rest of the job. dramatic, but valid. PostScript Level 2 printers only.
  • -noreport β€” disables the warning for unusual medium requests, like unavailable page sizes. can be used together with the ips options above to avoid warning messages from the printer. PostScript Level 2 printers only.
  • -sort[N] β€” obsessed with this one when you're making multiple copies of one document. on printers with the capability, it places each copy in a separate output bin. the start output bin is the bin indicated by the -outputtray option. the default start output bin is 2. N indicates the maximum number of copies produced. the default is the number of copies indicated by the -# option. and listen β€” blank space is not allowed between -sort and N. glue them together, no gap. 🫢
  • -duplex β€” prints the output in duplex mode. the default binding is as if the resultant pages are to be bound together with their leftmost edge. this is under the assumption that the input consists of PostScript in the default orientation. the -tumble option can be used for alternative binding.
  • -noduplex β€” some printers have duplex mode as their default (bold of them). this option makes those printers produce a single page on each sheet of paper.
  • -tumble β€” only useful with the -duplex option. it causes the backside pages to be flipped relative to the front side pages. the tumble of it all πŸŒͺ️
  • -selectstring β€” the string is placed in the PostScript input. if the statusdict dictionary exists in the PostScript interpreter, it will be present on top of the dictionary stack during the execution of string.
  • -courierold β€” a special feature that triggers use of Old Courier fonts on the OcΓ© 9145. it has no effect on other printers. niche queen, she's only for one printer πŸ’…
  • -nondsc β€” assume the input does not obey the Structure Conventions and try to make the most of it. super useful for output from packages like WordPerfect that don't produce proper PostScript. we work with what we got.
  • -- β€” indicates end of options. all following arguments are considered to be input file names. that's the line in the sand 🌈

πŸ’€ BUGS πŸ’€

some options do not cooperate well when they're all given on one command line. it's giving... conflict. 😭 in that case it might be wise to split the two operations into two separate passes over the file. for example:

psf -2 | psf -upside

instead of:

psf -2 -upside

pipe it, don't pile it. periodt.


πŸ¦‹ FILES πŸ¦‹

  • /usr/local/lib/ProcSets/pagemess.proc β€” the ProcSet for -m
  • /usr/tmp/psf..N β€” temporary files used for page reversal.

🌈 SEE ALSO 🌈

psprint(1), lpr(1), devps(1)


and that's the whole page, bestie! this was the local manual's PSF(1) β€” so when you're out here printing, remember: this is the local build's page 1 of the general commands manual. go forth and print responsibly πŸ’–βœ¨πŸŽ€