Thoughtful, detailed coverage of the Mac, iPhone, and iPad, plus the best-selling Take Control ebooks.

 

 

Pick an apple! 
 
Find Text Leading from Acrobat PDF

Ever have to recreate a document from an Acrobat PDF? You can find out most everything about the text by using the Object Inspector, except the leading. Well, here's a cheesy way to figure it out. Open the PDF in Illustrator (you just need one page). Release any and all clipping masks. Draw a guide at the baseline of the first line of text, and one on the line below. Now, Option-drag the first line to make a copy, and position it exactly next to the original first line at baseline. Then put a return anywhere in the copied line. Now adjust leading of the copied lines, so that the second line of copy rests on the baseline of the second line of the original. Now you know your leading.

Or you could buy expensive software to find the leading. Your choice.

Visit Mac Production Artist Tips and Scripts

Submitted by
Greg Ledger

 

 

Related Articles

 

 

The MacHax Best Hack Contest 2000 Winners

Send Article to a Friend

Although MacHack features sessions and papers and a variety of other events, much of the emphasis is placed on the annual MacHax Best Hack Contest, organized by the MacHax Group. All the MacHack attendees arrive for the keynote at 12:01 AM on Thursday, and then they spend all of Thursday and all of Friday hacking to create entries for the Hack Contest itself, which starts at midnight on Saturday. Everyone demos their hacks in turn, with the contest organizers projecting movies and silly graphics (including a parody this year of Apple's Think Different ads featuring Eric Raymond and the iBook that the MacHack attendees bought him) on the presentation screens between demos. This year may have been a record, with over 90 hacks submitted in a marathon session that finally broke up at 6 AM. You can see the full list of hacks on the online ballot at the URL below.

<http://www.tidbits.com/resources/537/esr-think- different.jpg>
<http://www.hax.com/Hack2000Ballot.html>

There's no way I could tell you about all of the hacks submitted, in part because there were so many, and in part because lack of sleep seriously hampered my ability to pay close attention as dawn grew ever closer. Here then are descriptions of the top five hacks along with a few others that I thought worthy of mention. You can get all of this year's hacks, along with papers and many of the presentations on the MacHack CD for $20. Also $20 (or $35 for both CDs) is the MacHack Historical CD, which contains hacks, papers, and presentations from the first 13 years of MacHack. All profits go toward funding future MacHack conferences. Keep mind that these hacks are completely unsupported, so any troubles you may experience are your own problem.

<http://www.mindvision.com/Shop/MacHackCD.asp>

Fifth Place: Los Alamos Security -- Jonathan Garry's AppleScript-based hack implemented "security practices" based on those at the Los Alamos National Laboratory. Drop a disk icon on the Los Alamos Security icon and the disk disappears, and a folder called Copy Machine appears on your desktop. Double-click the Los Alamos Security icon to hide the disks behind the copy machine, then double-click it again to reveal the disk. (If you don't keep up on current events, this is essentially a news hack making fun of the recently lost then re-discovered hard disks containing nuclear secrets at the weapons laboratory in Los Alamos, New Mexico.) Be warned that like all of these hacks, it may not work properly on your Mac; when I tested it, it hid my disk fine, but wouldn't reveal it. I recovered it by opening Sherlock, double-clicking the disk in the lower pane to open its window, then dragging the icon from the window title bar to the desktop.

<http://live.altavista.com/scripts/editorial.dll ?ei=1908731&ern=y>

Fourth Place: Monitor Doubler -- Eric Traut had some trouble demoing his Monitor Doubler hack, which doubles the horizontal and vertical resolution of your monitor. The projectors just couldn't handle the concept of a 2048 by 1536 resolution coming out of Eric's PowerBook, so he had to show it using the camera provided for Palm hacks. Even then, it was technically astonishing, with text on the screen actually being readable. Eric also added a magnifying glass feature that expanded the size of objects around the cursor in case the text just became too small. Eric warns that Monitor Doubler is very buggy, not well documented, works only in thousands of colors (16-bit), and probably won't work well with multiple monitors.

Third Place: Vertigo -- Some things shouldn't be allowed to happen near dawn, and this hack is one of them. Inspired in part by Chris Russ's MacHack paper on 3-D imaging, a team consisting of Drew Thaler, Ed Wynne, Darrin Cardani, and Keith Stattenfield produced Vertigo, which displays the entire desktop in 3-D stereo. Chris provided the bicolored 3-D glasses for everyone, and although the result of looking at this hack on the presentation screens with the glasses on was quite striking, it did truly evil things to my head at that hour of the morning.

Second Place: EtherPEG -- Written by three Apple engineers - Peter Bierman, Sam Bushell, and Stuart Cheshire (who wrote an excellent two-part article for us on bandwidth and latency some years ago), EtherPEG is a network sniffer that displays JPEG and GIF graphics being downloaded over unencrypted AirPort wireless networks. EtherPEG's designers wanted to create a simple tool that would encourage everyone to turn on encryption in their AirPort Base Stations, and although the contest organizers were a bit scared that someone in the audience would be caught surfing through a naughty site during EtherPEG's demo, everything went off without a hitch. Encrypting wireless network traffic may not be a big deal at your house yet (even if your office is good about it), but eventually there will be enough 802.11-compatible laptops out there that encrypting all network traffic will be the standard approach.

<http://db.tidbits.com/series/1014>
<http://www.etherpeg.org/>

First Place: Dock Strip -- The award for top hack of 2000 went to Miro Jurisic and Alexandra Ellwood for DockStrip, which makes the standard Mac OS control strip act like the Mac OS X dock, complete with the nifty way the dock increases the size of icons as the cursor moves over them. I was sitting at the same table as Miro and Alexandra while they were writing their hack, and it was amusing to see their approach to writing and debugging the code, along with some of the intermediate missteps that produced rather amazing visual glitches on screen.

<http://www.apple.com/macosx/theater/dock_ movie.html>

Other Worthy Hacks -- Among the many other hacks submitted, a few particularly caught my attention.

  • Jorg Brown's Mac OS X Throbber hack was a comment on Mac OS X's rather obtrusive throbbing OK buttons. Instead of just throbbing the OK button (which you could overlook, as Jorg noted), his hack caused everything on the screen except the OK button to throb, making it painfully clear where to click.

  • Mike Neil's FishHack was one of the few hardware hacks of the contest. Mike took something called "Big Mouth Billy Bass," a trophy-mounted plastic fish that could move its head and sing "Take Me to the River," and connected it to the Mac via an audio out cable. Then, whenever the Mac beeped, the fish would start to sing. Billy Bass served double duty as one of the prizes awarded at the banquet.

  • Rich Siegel (author of BBEdit) produced a hack for the Justice Department's antitrust trial against Microsoft. Instead of just splitting Microsoft into two separate companies, Rich's Divestiture hack split the windows of all Microsoft applications down the middle. You could even click in the space between the two halves to access whatever application lay underneath.

  • Mark Johns and Justin Lee, a pair of 16-year-old "yoots," won the Best Yoot Hack for Doggie-Style Windows, a hack that referenced one of Eric Raymond's keynote comments about dogs and territoriality. Whenever you dragged a window in the Finder, Doggie-Style Windows caused all the other windows in the background to "run away" so they weren't underneath the frontmost window.

  • Finally, Jimmy Grewal, Steve Falkenburg, Tantek Celik, and Maf Vosburgh of Microsoft submitted Internet Explorer 5.5b1 as their hack, making it the first ever to come with an End User License Agreement (EULA). New in Internet Explorer 5.5b1 was the capability to drag any graphic (even animated GIFs) to the toolbar as a button, a Command-Shift-click shortcut for opening a link in a new window in the background (finally!), and type-to-select navigation that enables you to type the first few letters of a link to select it before pressing Return or Enter to follow the link. The Microsoft team also used their sleepless nights at MacHack to improve the Tasman rendering engine's performance, standards-compliance, and stability. I even ran across a page that crashed Internet Explorer 5.0 instantly but loaded perfectly in 5.5b1. Internet Explorer 5.5b1 may just be a technology preview, but it is on the MacHack CD with the other hacks.

I was once again amazed at the incredible productivity caused by MacHack. Even though the code written during the short time before the Hack Contest itself was inelegant and horribly buggy, almost all of the demos actually worked. Several people noted that they actually did their best work at MacHack, since work doesn't necessarily stop on other programming projects during MacHack, and the confluence of so many smart people with such deep knowledge of everything related to programming the Macintosh provides a fertile environment for coding.

 

Make friends and influence people by sponsoring TidBITS!
Put your company and products in front of tens of thousands of
savvy, committed Apple users who actually buy stuff.
More information: <http://tidbits.com/advertising.html>