• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: printing in Xcode
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: printing in Xcode


  • Subject: Re: printing in Xcode
  • From: "Timothy J. Wood" <email@hidden>
  • Date: Mon, 8 Mar 2004 20:06:00 -0800

On Mar 8, 2004, at 5:19 PM, Chuck Soper wrote:
Thanks for asking. I would like:
- the ability to specify a different font and font size for printing.
- show the file name without the full path in the header.
- show "Page # of <total>" instead of just "Page #".
- allow the option of printing the file mod date or the file print date.
- customization of headers and footers.


You might try using 'enscript' and Xcode's user scripts. For example, I just wrote the following script:

----- cut here ----
#!/bin/zsh
#
# enscript.sh -- Generates and displays PostScript formatted output for source
#
# -- PB User Script Info --
# %%%{PBXName=View Formatted PostScript}%%%
# %%%{PBXOutput=Discard}%%%
#


FILENAME='%%%{PBXFilePath}%%%'
OUTPUT=/tmp/${FILENAME:t}.ps
printenv >> /tmp/env
echo FILENAME=$FILENAME >> /tmp/env
echo OUTPUT=$OUTPUT >> /tmp/env
/usr/bin/enscript -1 --header='$n||Page $% of $=' --font="Courier8" '%%%{PBXFilePath}%%%' > $OUTPUT
/usr/bin/open $OUTPUT
----- cut here ----


and put it in my /Library/Application Support/Apple/Developer Tools/Scripts as 70-Printing/10-enscript.sh (make sure to turn on the execute bit).

You can also set up a command key to get single keystroke access to the script.

'man enscript' has a ton of information on customizing the printout (tons of header/footer configuration, etc). The version above does some of what you wanted :)

-tim
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.


References: 
 >printing in Xcode (From: Chuck Soper <email@hidden>)
 >Re: printing in Xcode (From: David Ewing <email@hidden>)
 >Re: printing in Xcode (From: Chuck Soper <email@hidden>)

  • Prev by Date: Re: printing in Xcode
  • Next by Date: Re: printing in Xcode
  • Previous by thread: Re: printing in Xcode
  • Next by thread: Re: printing in Xcode
  • Index(es):
    • Date
    • Thread