I have been using latexmk to make a pdf file in the following way:

latexmk -pdf filename.tex; open filename.pdf

This opens the pdf in Preview. However I want to open the pdf with a given zoom (problems with vision), and Preview reverts to a default zoom at every opportunity. This is annoying because I like to recompile my latex quite often.

I have tried using "open -a" with both skim.app and Adobe Acrobat Reader, because I have gained the impression from reading about these pdf viewers on the web that one can change the default viewing parameters. Unfortunately, a command line such as the one above, possibly using "open -a skim.app filename.pdf" produces the error message that either the file or the program "can’t be opened because it is from an unidentified developer". This happens whether of not I tell the system (via Command-I) to always open filename.pdf with the appropriate application (skim or Reader).

Since skim provides some kind of AppleScript access, which Preview doesn't, I wondered whether to try using AppleScript. But I need to get on with what I'm writing, rather than get into an infinite regress of things I need to learn first.

I use vim for editing, and briefly considered vim-latex, but rejected it as too complicated to 1) install and 2) learn how to use. I want no more than to open, from the command-line, a particular pdf in a pdf viewer where one can control the parameters for viewing.

  • If I recall correctly a PDF can contain the default preview options. How to get them in there depends on the LaTeX engine used and your document. Commented May 28, 2018 at 6:26

2 Answers 2


You have a couple of problems here.

First, the message ""can’t be opened because it is from an unidentified developer" refers to the application.

Open Skim from the Finder and it will pop up a dialog telling you it is from an unidentified developer. Click on OK. Now open the "Security & Privacy" pane of System Preferences and under the General tab you will have the option to open the application anyway. Click "Open" and the app will open. You only have to do this once.

Second. Open a PDF in Skim and zoom it to the amount you require to be able to view it with your vision problems. Turn on or off the Contents and Notes panes as desired. Now select "Use Current View Settings as Default" under the PDF menu.

Now when you open a PDF in Skim it will be at the right zoom settings so open -a Skim.app example.pdf will work for you.


There are two ways for a PDF to be displayed with a given zoom:

  1. The application remembers window/zoom settings [for each file].
  2. The PDF itself includes data to specify the opening behaviour.

Preview does not remember the zoom factor (though it will open at the same page as last viewed). As stated in the other answer, other PDF viewers may have default zoom settings.

As you're creating your PDF from latex, you may want to look at incorporating pdfmark operators into your latex.

The code for the pdfmark is something like:

[ /Dest MyZoom
  /Page 0
  /DEST pdfmark

4 is a zoom of 400%. Page 0 means no page is specified.

I know nothing of latex, but a quick Google suggests it is possible to insert pdfmarks into latex.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .