Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Print Safari pages to PDF without page breaks Web Browsers
I do a lot of work in the print world and the web world and I live and die by the PDF format. I find that PDF's are the best all around cross platform format for everyone. Sometimes I need to send a PDF of a web page to a client. If you use the Adobe WebCapture feature of Adobe Acrobat (full version) - which btw does a great job of snagging web pages and keeping links intact - then your web page is broken up into 8x11 pages with nasty links between pages and graphics broken up and shifted around.

You can't just print to PDF from OS X either - the page will still be broken up. So what I do is create a custom page size thats just the right width and height for the web content and then print to PDF...

Page Setup > Custom Page Size

... but wait there's more. I found out that even after creating a custom page size in Safari and then printing the page to PDF - I was still getting more width than I had specified in my page size - displaying the web content with white on the left side. What I discoverd though - was that if you shrink your window in Safari to the exact width of the web content - the Print dialog honors that and only prints the web content.

I suppose this could be used to zero in on a certain portion of a web page and print only that section too.
  Post a comment  •  Comments (1)  
  • Currently 2.33 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (3 votes cast)
 
[21,848 views] Email Article To a Friend View Printable Version
Use PTHPasteboard to extract Safari text clippings Web Browsers
There have been suggestions previously for getting text clippings out of Safari (which doesn't seem to support the usual text drag and drop). If PTHPasteboard (a really great freeware multiclipboard app) is installed, text which has been copied to the clipboard can be dragged from the PTHPasteboard pallette to the Finder to create a standard text clipping.

[Editor's note: You can, of course, substitute another clipboard app like CopyPaste+ and achieve the same results ... and the other workaround is to paste the text into a clipping-aware application then drag it from there. PTHPasteboard was a recent Pick of the Week, and it has quickly become a required utility on my machines...]
  Post a comment  •  Comments (4)  
  • Currently 2.50 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
 
[3,210 views] Email Article To a Friend View Printable Version
Add PDF icon definitions to Safari Web Browsers
I recently read this hint which explains how to get Safari to recognize PDF files stored on your local drive. I now use Safari as my default PDF viewer, however if you set a PDF to open with Safari by default, the PDF icon will be the generic document icon because Safari doesn't include an icon for PDFs. Here's how to get a nice icon instead...

First you need to make a nice icon. Control-click on Safari and select "Show Package Contents". In the Resources folder you will find "document.icns" which is the icon file used for HTML documents. Duplicate this file and call it something like "pdfDocument.icns", open it in an icon editor like Iconographer and add the text "PDF" to it (or get as creative as you like). Alternatively, you could simply copy an existing PDF icon file to the Resources folder. Whatever you do, just make sure your new icon file is in the Resources folder. Now that you have the icon file, all you have to do is tell Safari to use it. Open the "info.plist" document (in the Contents folder) and find the PDF document type key you added (described in the hint referenced above). Within this key is the key which defines the PDF extensions:
<key>CFBundleTypeExtensions</key>
<array>
<string>pdf</string>
<string>PDF</string>
</array>
Place the following just below it:
<key>CFBundleTypeIconFile</key>
<string>pdfDocument.icns</string>
Just make sure that the name between the "string" tags matches the name of your PDF icon file. Now when you change a PDF to open with Safari, it should use the icon file you specified. I think you might need to log out for the changes to be recognized by the system.
  Post a comment  •  Comments (4)  
  • Currently 2.00 / 5
  You rated: 2 / 5 (5 votes cast)
 
[8,310 views] Email Article To a Friend View Printable Version
A selection of add-ons for use with Mozilla Web Browsers
I don't know how many are left using Mozilla; I also thought this should have been a tip before, but except for Multizilla I didn't find anything. So, Mozilla users, have a look at the mozdev.org Projects page. There are a whole lot of add-ons for Mozilla; just a few examples:
  • Games, like Minesweeper or Solitaire
  • Adblock to hide ads (it doesn't prevent them from being downloaded so far.)
  • Preferential, a GUI to all of Mozilla's preferences (though some don't work with OS X).
  • Leech, a batch downloading utility; just make sure to enter pathways with : as separators...
  • Pubmed, a toolbar interface to NLM's Medline.
  • Dynamiclinks, create links by control-hovering over a word (try and find out what that means...)
All are easy to install, so give them a try...
    •  Comments (10)  
  • Currently 3.50 / 5
  You rated: 2 / 5 (18 votes cast)
 
[23,228 views] Email Article To a Friend View Printable Version
View framed links in Safari outside the frame Web Browsers
If you click and drag a link that is in a frame to "pick it up," and then just drop it back in the browser window, you will view that link outside of the frame.

[Editor's note: Of course, the contextual menu works for this as well; control-click the link and select "Open Link in New Window." But if you don't want a new window, the drag/drop method described here is actually easier and faster!]
  Post a comment  •  Comments (3)  
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[3,635 views] Email Article To a Friend View Printable Version
Add an image size information feature to Safari Web Browsers
One nice feature found in some other browsers but missing from Safari is when you open an image in its own window, the browser tells you the image width and height in the title bar. This can be fairly useful when developing web pages. So after looking at one or two of Apple's Safari AppleScript examples and using ImageMagick, I cobbled together a solution. Click the link for instructions, the script and source download, and to see a screen shot.
  Post a comment  •  Comments (1)  
  • Currently 3.20 / 5
  You rated: 4 / 5 (5 votes cast)
 
[7,034 views] Email Article To a Friend View Printable Version
Browse local PDFs in Safari Web Browsers
Mad that Preview.app is turtle slow with PDFs? Well, I have a fix for you, using Safari. First, install Safari and the PDF browser plugin from schubert-it.com. Now, this will let you see PDFs on the web, but what about ones on your hard drive? Safari doesn't know it can open them. Here's how to teach it...

Right click and show package contents in Safari. Then open Info.plist in TextEdit. Find the first document type (the second overall) and paste this right before it; you're essentially adding a document type key:
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>pdf</string>
<string>PDF</string>
</array>
<key>CFBundleTypeMIMETypes</key>
<array>
<string>application/pdf</string>
</array>
<key>CFBundleTypeName</key>
<string>NSPDFPboardType</string>
<key>CFBundleTypeOSTypes</key>
<array>
<string>PDF </string>
</array>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>NSDocumentClass</key>
<string>BrowserDocument</string>
</dict>
Save, run Safari, quit Safari, and then enjoy drag and drop PDFs in Safari.

[Editor's note: I have not tested this one...]
  Post a comment  •  Comments (21)  
  • Currently 4.00 / 5
  You rated: 5 / 5 (4 votes cast)
 
[16,095 views] Email Article To a Friend View Printable Version
Supercharge Mozilla's tabs Web Browsers
If you're not 100% converted to Safari, and still like Mozilla's feature set and its tabbed interface, here's a way to get even more out of those tabs. Tabbrowser Extensions greatly expand the capabilities of Mozilla (and Netscape) tabs. Installation is simply a matter of following the link on the web page and restarting Mozilla.

Once installed, you'll find your tabs have a wide array of new powers (there's an FAQ page on the site that explains much of what you can do). Instead of the four simple radio buttons in the tabbed browsing prefs area that you had before, you now have eight separate sections, each of which has numerous options! I'll be honest and admit that I haven't tried more than two or three of them at this point, but the power is there if you want to use it.

For me, the two biggest gains are that you can rearrange tabs by dragging them around (hooray!), and a customizable tab contextual menu that can include items such as auto-reload time (for your favorite news or sports page), duplicating the tab, disallowing JavaScript on the tab, and much much more.

There's even a one-button uninstaller if you don't like what you see. It's not quite perfect (the prefs dialogs have a spacing issue on my machine, and I have one problem with a form page that insists on trying to set the reload time), but there are enough nice productivity features to make it worth a minor glitch or two.

If you're hooked on tabbed browsing, Tabbrowser Extensions will do nothing to cure your addiction!
  Post a comment  •  Comments (10)  
  • Currently 1.50 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
 
[6,878 views] Email Article To a Friend View Printable Version
Remove bogus entries from Safari's history file Web Browsers
If you've enabled the Debug menu in Safari, you may have noticed the "Populate History" item. If you ... accidently ... click it, it fills your history with up to 1000 bogus sites. I've written a perl script that removes them.
#!/usr/bin/perl
use warnings;
use strict;
my $file="/Users/jmelloy/Library/Safari/History.plist";
$/="<array>";
open(FILE,$file) or die qq(Unable to open "$file": $!);
my $toss = <FILE>;
$/="</dict>";
my @history = <FILE>;
close(FILE);
my $outfile = "History.plist";
open(OUTFILE, ">$outfile") or die qq{Unable to open "$outfile": $!};
print OUTFILE $toss;
for(my $i = 0; $i < @history; $i++) {
if($history[$i] =~ /.*bogus.*/) {
}
else {
print OUTFILE $history[$i];
}
}
close(OUTFILE);
Copy that into a text editor, make it executable (chmod +x history.pl). All that needs to be changed is the username ("jmelloy"). It's non-destructive, it creates a new file in the same directory you ran the script from. Then, all you need to do is copy the new History.plist file to ~/Library/Safari/History.plist and you're done.

If you also want to remove "other" things from your history, all you need to change is the regular expression that matches the word "bogus".
  Post a comment  •  Comments (3)  
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[4,369 views] Email Article To a Friend View Printable Version
Using Safari and Outlook Webmail Web Browsers
If your company has MS Outlook Webmail, by which you can check corporate email on the Internet, you might notice that when you try to reply or forward an open message, it automatically closes when you click on reply or forward. Normally, a new window would open that would allow you to add your message etc., before you send.

Upon experimentation, I realized that this only happens when Block PopUP Windows is selected under the Safari menu. This is probably because Outlook Webmail uses an 'onclose' javascript command when you hit reply, to spawn another window, (which is recognized as a pop-up window by Safari). To reply safely in Outlook Webmail, disable the feature temporarily.
  Post a comment  •  Comments (4)  
  • Currently 2.20 / 5
  You rated: 3 / 5 (5 votes cast)
 
[10,789 views] Email Article To a Friend View Printable Version