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

Moving custom paper sizes from Snow Leopard to Lion System 10.7

I was recently asked to see if I could copy over the custom page sizes from a Snow Leopard machine over to a Lion machine.

While finding the right file in ~/Library/Preferences (com.apple.print.custompapers.plist) wasn't so difficult, it turned out that the Snow Leopard version of the file is binary encoded while the Lion version is not. (It may be that this file was grandfathered in from a previous system.)

XCode for Lion can convert the file to a regular XML text file:

  1. Open the file in Xcode.
  2. Choose File > Duplicate.
  3. In the Save dialog box, select "Property List XML" from the Format drop-down list.

Moving the regular text version over to Lion and putting it into the Preferences folder gave us a way to copy a huge list of custom paper sizes from one designer to another quickly and easily.

    •    
  • Currently 4.25 / 5
  You rated: 3 / 5 (4 votes cast)
 
[5,637 views]  

Moving custom paper sizes from Snow Leopard to Lion | 5 comments | Create New Account
Click here to return to the 'Moving custom paper sizes from Snow Leopard to Lion' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Moving custom paper sizes from Snow Leopard to Lion
Authored by: fido on May 04, '12 11:21:43AM
Converting plist files from binary to xml can also be done without XCode installed.

In Terminal:

cd  ~/Library/Preferences 
plutil -convert xml1 com.apple.print.custompapers.plist
If you want to convert it back to binary:
plutil -convert binary1 com.apple.print.custompapers.plist


[ Reply to This | # ]
Moving custom paper sizes from Snow Leopard to Lion
Authored by: David Allen on May 05, '12 08:53:35AM

Thanks for the shortcut without the bother of Xcode!

---
Dah•veed |David Allen|
Monterrey, NL, Mexico



[ Reply to This | # ]
Moving custom paper sizes from Snow Leopard to Lion
Authored by: Typhoon14 on May 04, '12 11:26:38AM

Of course, this requires that you have xCode installed. Any easier was is probably to just do:

plutil -convert xml1 /path/to/file.plist

[edit] Beat to it, I see :)

Edited on May 04, '12 11:27:27AM by Typhoon14



[ Reply to This | # ]
Moving custom paper sizes from Snow Leopard to Lion
Authored by: arcticmac on May 05, '12 08:07:49PM

Several people have noted that you can convert plist files with plutil. However, any sensibly written code (i.e. where the developer used the API to read plist files instead of writing his/her own custom code to parse the plist) on a Mac couldn't care less what format the plist is in (ascii, xml, binary) because the APIs handle it transparently. So converting binary to XML shouldn't even be required.

In fact, on my Lion install, the plist is in binary already.



[ Reply to This | # ]
Moving custom paper sizes from Snow Leopard to Lion
Authored by: arcticmac on May 07, '12 08:18:31AM

An interesting note is that almost all of the preference files I have (under Lion) are binary plist files, BUT when you preview them with QuickLook, the preview shows you an XML plist, even though the file on disk is actually binary - try opening in TextEdit or running the 'file' command on one of them in the terminal to see which ones are binary vs XML.



[ Reply to This | # ]