Tuesday, October 06, 2009

VMware Fusion 2.0.6 + Alibre Design 12 = Good News

For the early adopters who ran Alibre Design on Windows in VMware Fusion virtual machines, VMware 2.0.6 brings some very good news: the dreaded stuck-red-highlight bug is gone.

When you move the mouse cursor, Alibre's 3D views highlight the face or edge closest to the cursor. In VMware, this red highlight would be stuck -- or rather, it would only turn ON, but never OFF.

The issue was present in every VMware 2 up to and including 2.0.5, and in every version of Alibre Design starting with at least 10. I only tried it on MBP with NVidia graphics, so it might have been an NVidia-only issue.

I was very nicely surprised after updating VMware to 2.0.6 today. Not only did networked Windows startup take perhaps 25% less time (somehow), but Alibre's workspace starts up much faster (feels like 50%) and the workspace display is bug-free, as far as I can tell.

This, coupled with significant speed improvements in Alibre 12, means that a very solid parametric CAD is available for OS X on Intel machines for ~$300 extra over the per-set price on Windows. That $300 factors in the eBay cost of Windows XP license, and the cost of a VMware license. Never mind that you could get a basic Alibre seat for $99 in a promotion that just expired a few days ago. Sweet!

Update: things still work just fine with Fusion 3.1.1 and Alibre Design 12.1 - as shown in the picture above.

Sunday, October 04, 2009

PDF to PS to PDF on OS X: How to Fix Those That Cause Errors

Apple's OS X generates anti-distillation blurbs in the PostScript files generated from "encrypted" PDFs. Remember prohibition, anyone?

The "encrypted", or locked down, rather, PDFs happen to be mostly everything these days. Forms that are meant to be fillable, bank account statements where you want to mark things up to reconcile accounts, etc. My most recent run-in with this stupidity was Anthem's and CompanionLife's insurance forms. I actually wish we didn't have to fill out, um, modify those, right? And surely it's every insurance companies' dream to get the forms back with my dreadful handwriting on them...

So, the pdfs are marked as protected from modification. OS X's otherwise excellent Preview doesn't ignore such marks when you print to PostScript. Thus, the resulting postscript files throw an error when you try to distill them back into pdf, say using ps2pdf14.

Upon inspection of the postscript files, you can see the eexec blurb, which can be decoded using ghostscript's decode.ps. The only useful part of the blurb is cg_md begin.

Thus, if you want to clean up your postscript files printed from "protected" PDFs , you need to replace stuff between mark currentfile eexec and cleartomark with cg_md begin. This can be done using this handy dandy utility:

#! /usr/bin/env python3
# copy a postscript file from stdin to stdout, removing

# Apple's ps-to-pdf "protection"
import sys;
inside = False
for line in sys.stdin:
    if not inside:
        if line.startswith("mark currentfile eexec"):
            inside = True
            print(line, file=sys.stdout, end="")
        if line.startswith("cleartomark"):
            print("cg_md begin"file=sys.stdout)
            inside = False