Tuesday, March 19, 2013

Snapshot tool using Adobe Acrobat on a secured file

When attempting to use the snapshot tool (camera icon) to select parts of a .pdf for a journal club paper today, I ran into an error. The highlight square would appear, but the area would not get copied to the clip board, so I could not paste it into my presentation. I had downloaded the paper from the journal's website, and it had some security enabled that resulted in it saying "(SECURED)" in the title bar, next to the .pdf's name:

The problem occurred in both Adobe Acrobat and Reader. To fix it, I clicked on the lock icon in the left menu (Security Settings) and then clicked "Permission Details" (see above screenshot).
This opened the "Document Properties" dialogue box to the "Security" tab. Here I chose "No Security" from the drop down "Security Method" menu (see screenshot below), click OK, and voila--the snapshot tool worked!

Monday, March 11, 2013

Smooth lines become jagged when saved from matplotlib

I just learned about a very important parameter when saving .pdf or .svg files of figures with many small axes:

import matplotlib.pyplot as plt

Matplotlib (pyplot) tries to intelligently downsample the points that make up lines in order to save space, but when you have very small subplots this results in jagged lines. By either turning off this path.simplify feature, or decreasing the threshold, those lines will be smoother.