Command Line Parameters
When used from the command line (some terminal and shell in Unix, cmd.exe on Windows), Impressive accepts a range of command-line options in GNU getopt syntax.
The following options are available (in alphabetical order):
- a <seconds> or --auto <seconds>
Automatically advance to the next page after the given number of seconds. Together with the -w option (described below), this can be used to create automatic slideshows.
- A <X>:<Y> or --aspect <X>:<Y>
Specifies the display aspect ratio. Normally, Impressive assumes that the pixel aspect ratio is 1:1 (square pixels), regardless of the display resolution that has been set up. If a resolution has been selected that doesn't match the display's aspect ratio, the screen will be distorted. To overcome this, this option may be used to manually specify the display aspect ratio, e.g. »-A 16:9«. Note that this option has no effect if Xpdf is used for rendering.
Disabled background rendering. By default, Impressive will pre-render all pages in a separate background thread while the presentation runs. If this option is specified, it will instead render all pages immediately on startup. This option has no effect if caching is disabled (--cache none, see below).
Sets the duration (in milliseconds) of the highlight box fade-in/fade-out animation. Default value: 100 ms.
- c <mode> or --cache <mode>
Specifies the page cache mode to use. Valid options are:
none
Disables page caching altogether, only the current and the following page will be kept in RAM. Jumping between pages will be very slow, because Impressive will need to render the requested pages on the fly. In addition, the overview page won't be complete until every page has been shown at least once.
memory
Caches all page images in memory. This is the fastest method, but it requires very large amounts of memory (about 3 MiB per page at 1024x768 resolution).
disk
Like above, but uses a temporary file rather than memory for storage. This is the default.
persistent
Uses a permanent cache file for caching. This file will not be deleted when Impressive quits and will be reused on subsequent invocations. The default name for the cache file is derived like the names for Info Scripts (see below for an explanation), but with a .cache file name extension instead of .info. This method is a little bit slower than disk mode, but the time span until the overview page is fully populated will be significantly decreased if Impressive is ran again with the same input files and options.
The mode name may be abbreviated at will, down to one character. Thus, --cache persistent, -c persist and even -cp are all synonyms.
- C <filename>[:<X>,<Y>] or --cursor <filename>[:<X>,<Y>]
This option can be used to specify the path to an image file (typically a transparent .png) that shall be used as the mouse cursor instead of the default one. Optionally, the hotspot may be specified (this is the position inside the cursor image where the real mouse position is located). Example: --cursor mycursor.png:2,4
- d <time> or --duration <time>
Specifies the expected run time of the presentation. The time parameter can be either a number of seconds or a human-readable time like 1:23 (1 minute and 23 seconds), 4:56h (4 hours and 56 minutes), 3m45s (3 minutes and 45 seconds), 5m (5 minutes) or 1:23:45 (1 hour, 23 minutes and 45 seconds).
If an expected duration is specified, Impressive will show a semi-transparent green progress bar at the lower edge of the screen, indicating how much time has already passed. If the time is up, the bar will occupy the whole edge and fade to yellow (at 125% of the expected time) to red (at 150% or more).
- D <ms> or --mousedelay <ms>
Sets the time (in milliseconds) the mouse cursor is shown in fullscreen mode if it is not moved. Default value: 3000 ms.
OpenGL normally only supports textures with power-of-two dimensions. This means that for a 1024x768 screen, the actual texture size will be 1024x1024, for 1600x1200 it will even be 2048x2048. To overcome this limit and save texture memory, Impressive will automatically use the OpenGL extensions GL_ARB_texture_rectangle (available on most graphics cards) or GL_ARB_texture_non_power_of_two (available on modern graphics cards with current drivers). If these cause any trouble, the -e option may be used to prevent Impressive from using the problematic extensions.
Toggles fullscreen mode. By default, fullscreen mode is activated, and can be deactivated using this switch.
Note: On Windows systems, toggling fullscreen mode while Impressive runs does not work. So, this option is the only way to set whether fullscreen mode shall be used or not.
- F <file> or --font <file>
Impressive uses some kind of text OSD to overlay the current page number and title (if available) on the overview page. This option can be used to specify a TrueType font file (.ttf) to use for the OSD. If the path specified doesn't directly point to a useable font file, Impressive will try to search the system font directories. On Unix-like systems, it assumes that all fonts are stored below /usr/share/fonts, /usr/local/share/fonts or /usr/X11R6/lib/X11/fonts/TTF for this purpose (the latter one is useful for Mac OS X systems specifically). If this option is not specified, Verdana.ttf will be used as a default if the operating system is Windows, or any of DejaVuSans.ttf or Vera.ttf (the typical file name of Bitstream Vera Sans) if it's not.
- g <width>x<height> or --geometry <width>x<height>
Sets the screen size or resolution Impressive shall use (in pixels). On Win32 platforms and Unix platforms with xrandrinstalled, the default screen size for fullscreen mode is the current screen resolution; on other platforms, Impressive uses the highest resolution available to the graphics system. If a standard resolution cannot be determined, the default is 1024x768 pixels. Note that this option is not the standard X “geometry” option and does therefore not support window positioning (e.g. -g 800x600+0-0 will not work!).
- G <gamma>[:<blacklevel>] or --gamma <gamma>[:<blacklevel>]
Sets up the startup gamma and (optional) black level value. The black level is the original image's intensity level (0...254) that is to be mapped to black in Impressive's output. Note that gamma and black level adjustments may be unavailable or constrained on some systems.
If this option is specified, Impressive writes a short command line help screen to standard output and does not start a presentation.
- i <page> or --initialpage <page>
Specifies the page number to start with. The default value is 1 (start with the first page). If another value is specified, the page shown by Impressive right after initialization is not the first one of the PDF or image list. Additionally, pre-rendering (if enabled) will also start at the specified page.
- I <filename> or --script <filename>
Overrides automatic derivation of the info script filename and specifies a script file directly.
If this option is specified, Impressive writes a list of all available transition classes to standard output and does not start a presentation. Transitions that are enabled by default are marked with a star (*) left of the class name.
- L <spec> or --layout <spec>
Specified the OSD layout. Read below for an explanation of this option
If this option is set, Impressive will show the on-screen timer (activated with the [T] key) only with 1 minute resolution. By default, it will show a timer with 1 second resolution.
This option disables the Impressive logo and version number display. Instead, the loading screen will be just black or, if background rendering is disabled, only the progress bar will be visible.
- o <directory> or --output <directory>
Do not display the presentation, but render it into a series of PNG image files inside the specified directory. The images will be generated in the current resolution as specified by the -g option. This option is useful if you're going to give a presentation on a foreigh PC with an old, broken or otherwise problematic Xpdf or GhostScript installation: By generating images of the PDF pages you can ensure that no rendering bugs will happen on the target system.
- O <mode> or --autooverview <mode>
Enables or disables automatic derivation of whether a page shall or shall not be shown on the overview page. This feature is based on the fact that some LaTeX presentation packages tag all pages with a title (that can be read by Impressive with the help of pdftk), except those that contain multiple reveal steps.
The following modes are available:
off
Disables automatic overview mode. All pages will be shown on the overview page by default. This is also the default setting.
first
All pages with a PDF title will be shown on the overview page. The purpose is to show the initial state of multi-step slides on the overview page.
last
All pages before a page with a PDF title will be shown on the overview page. The purpose is to show the final state of multi-step slides on the overview page.
Again, the mode may be abbreviated arbitrarily, down to one character, just like with the -c option above..
- p <start>-<end> or --pages <start>-<end>
Using this option, the range of the page displayed can be narrowed down. The presentation will start at the first page in the range. All pages outside of the range will not be shown on the overview page and will not be cached. However, they can be entered manually when cycling through the presentation. Due to the fact that these pages are uncached, preparation of the display will take considerably longer.
- P <path> or --gspath <path>
This option can be used to override the Xpdf / GhostScript path autodetection. The full path to the executable of either GhostScript (gs or gs.exe) or Xpdf's pdftoppm utility must be specified.
If this option is enabled, Impressive will show a light-blue semi-transparent progress bar at the lower edge of the screen that shows the position inside the presentation, i.e. the relation between the current page number and the total number of pages. Note that this progress bar will not be shown if the duration progress bar (-d option) is also enabled.
Display all pages rotated by n×90 degrees clockwise. Try -r 1 or -r 3 if you run into problems with PDFs generated by LaTeX on some Xpdf or GhostScript versions.
- R <X>x<Y> or --meshres <X>x<Y>
Most effects subdivide the visible screen into a mesh of rectangular or quadratic pieces, each with its own coordinates and alpha blend values. Using this parameter, the resolution of the subdivision mesh can be defined. The default value is 48x36. On slow machines, lower values like 24x18 or 12x9 can heavily speed up transition rendering at the cost of visual quality. On the other hand, higher values like 64x48 or 96x72 improve quality, but use much more CPU cycles.
- s or --scale (image input only)
If a directory with image files is used as input, Impressive will scale down images that are too big for the screen. But by default, it will not scale up smaller images to fit the screen; it will leave a black border instead. This option overrides this setting and enables upscaling of smaller images.
- s or --supersample (PDF input only)
This switch enables antialiasing by 4x supersampling instead of the normal multisampling method used by Xpdf or GhostScript. While this usually degrades both visual quality and performance, it may be necessary for circumventing white strips or moiré-like patterns in gradients.
- S <pixels> or --fontsize <pixels>
This option sets the size, in pixels, of the OSD font. The default value is 14.
- t <ms> or --transition <trans1[,trans2...]>
Using this switch, the set of transitions Impressive will randomly draw at page changes can be specified. If only one transition class is specified, this class will be used for all pages that do not have another transition explicitly assigned in their page properties. Multiple transitions have to be separated by commas; they will be used in random order. The -l option can be used to get a list of available transitions.
- T <ms> or --transtime <ms>
Sets the duration (in milliseconds) of page transitions. 0 (zero) disables transitions altogether. Default value: 1000 ms.
- u <seconds> or --poll <seconds>
If this option is specified, the source file or directory will be checked for changed regularly. If a change in the input PDF file or any of the image files in the input image directory is detected, the page cache will be flushed and the current page as well as the info script will be reloaded. The current page's transition will be shown between the old and the new version of the page.
The new PDF file must have at least as much pages as the old one; also, it should have the same aspect ratio. If the input is a directory, image files must not have disappeared.
- V <pixels> or --overscan <pixels>
PDF files often contain tiny amounts of white borders around the edges which look bad in screen presentations. To eliminate this problem, Impressive uses »overscan«: PDF files will not be rendered to fit the screen size exactly, but they will be rendered a bit larger so that the (possibly broken) borders can be cropped off. The amount of overscan, in screen pixels, can be set with this option. The default value is 3 pixels, which should remove borders in most presentations at most common screen resolutions without cropping the pages too much.
If this option is set, Impressive will “wrap” over to the first page after the last page. In other words, advancing to the next page at the end of the presentation will restart the whole presentation.
This option enables a smooth fade-in effect at the start of the presentation and a fade-out effect just before Impressive quits.
If this option is enabled, the input files will be shuffled into random order before starting the presentation. The individual pages of PDF input files will stay in their original order, though, so this option is mainly useful for image presentations.
- z <factor> or --zoom <factor>
Sets the zoom factor that is used in zoom mode. It must be an integer value of at least 2. The default value is 2. Note that it might not be possible to get high-quality zooming for large zoom factors due to hardware restrictions.
- Z <ms> or --zoomtime <ms>
Sets the duration (in milliseconds) of the overview page zoom-in/zoom-out effects. Default value: 250 ms.
Activates persistent cache mode and specifies the name of the cache file to use.
Following the options, the input file name(s) must be specified. Recognized file types are PDF, JPEG, PNG, TIFF, BMP and PGM/PPM. If the name of a directory is put on the command line, all recognized image files (no PDF files!) in this directory will be played in alphanumeric order (case-insensitive).
In addition, Impressive can use a text file containing a list of files or directories to show: This text file must contain at most one file name per line; every character after a hash sign (#) is treated as a comment and will be ignored. If such a comment is put on the same line as an image file name, it will be used as the page's title. List file names must be prefixed with an at sign (@) on the command line, e.g. impressive @my_list_file.
Impressive will also expand wild-card characters (* and ?) if this isn't already done by the shell, but apart from that, it will not reorder the arguments. Thus, it will show the documents in the order specified at the command line.
出典
Impressive Documentation
最終更新:2012年10月19日 07:49