Pearl Crescent
Pearl Crescent
Page Saver Basic & Pro
Documentation
Pearl Crescent Page Saver Documentation (Basic & Pro Editions)
Using the Page Saver Toolbar Item
After you install the Basic or Pro edition of Page Saver and restart Firefox, a new "Save As Image" item appears on the Firefox navigation toolbar (the toolbar item's icon looks like a camera).  See Figure 1.
Page Saver toolbar item
Figure 1 — The Page Saver Toolbar Item

To save an image of a web page, click on the toolbar item.  By default, a PNG-format image of the entire page is saved to a local file.  This behavior may be changed by adjusting the Page Saver options as described below, or by holding down one of the following modifier keys as you click on the toolbar item:
  • Alt — save an image of the visible portion of the current web page.
  • Shift — save an image of the entire web page (including the portion that does not fit in the browser window).
  • PROCtrl (Windows and Linux) or Command (Mac OS) — select and save an image of a rectangular region on a page (Page Saver Pro only).  Look below for more information.

Page Saver Pro toolbar menu
Figure 2 — The Page Saver Pro Toolbar Menu
You may also use the menu associated with the Page Saver toolbar item to save images of pages (see Figure 2).  Choose one of the following menu items:
  • Save Image of Visible Portion...
  • Save Image of Entire Page...
  • Save Image of Entire Frame
  • PROSave Image of Region You Select...

If the page you are viewing contains any frames or iframes, the Save Image of Entire Frame item will provide a menu that contains a list of each top-level frame on the page that may be captured.

In Firefox 3, check the Arrange to Capture Flash Content menu item to have Page Saver alter certain pages as they load to make it possible to capture the Flash content.  Enabling this feature may cause some pages that contain Flash content to load incorrectly.  Learn more.

PROIn Page Saver Pro, you may also use the toolbar menu to choose a destination for the image (a local file, your computer's clipboard, or, if configured, an FTP, HTTP, or HTTPS server).

The toolbar menu also contains a Send Feedback... item which takes you to a form on the Pearl Crescent web site and a Page Saver Options... item which may be used to open the options window.

To change the position of the toolbar item or remove it, open the Customize Toolbar window via Firefox's View | Toolbars | Customize... menu item.

Using the Browser Context Menu
Page Saver adds the following browser context menu items to Firefox:
  • Save Image of Visible Portion... — save an image of the visible portion of the current web page.
  • Save Image of Entire Page... — save an image of the entire web page (including the portion that does not fit in the browser window).
  • Save Image of This Entire Frame... — save an image of the entire contents of a frame or iframe.
  • PROSave Image of Region You Select... — select and save an image of a rectangular region on a page (Page Saver Pro only).  Look below for more information.
Right-click on a web page to open the browser context menu (control-click on Mac OS X).

To hide one or more of the Page Saver context menu items, uncheck the appropriate checkbox on the Page Saver options window's General tab.

PROSelecting and Capturing a Region on a Page
In Page Saver Pro, you may select and capture a rectangular region on a page by holding down the Ctrl key (Windows and Linux) or Command key (Mac OS) while you click on the Page Saver toolbar item.  Alternatively, you may choose the Save Image of Region You Select... command from one of the Page Saver menus.
Capturing a Region on a Page
Figure 3 — Capturing a Region on a Page

The contents of the page will be dimmed and a large “cross hair” mouse pointer will appear.  You can then click and drag the mouse to highlight a region on the page (note that automatic scrolling of the page is not supported).  After you release the mouse button, you may adjust the size and position of the region.

To complete the capture, click the Capture button.  To cancel the capture, press the Esc key.

Figure 3 shows a screenshot of the region capture process.  You may also view a video demonstration.

From the Page Saver option window's General tab, you may make capturing a region the default action and you may add a keyboard shortcut.  Refer to the section Customizing Page Saver for more information.

Using Page Saver from the Command Line
To save an image of an entire web page from the command line, use the -saveimage flag.  For example:
firefox -saveimage http://www.mozilla.org/
Remember to enclose the URL in quotes if it contains any special characters such as ? or & that will be interpreted by your command shell. For example:
firefox -saveimage "http://www.google.com/search?q=Page%20Saver&ie=utf-8&oe=utf-8"
If a page contains a meta refresh directive, in Firefox 3 and newer, Page Saver Basic and Pro will wait up to 10 seconds for the refresh to occur (e.g., for another page to load).  In Page Saver Pro, the -saveoptions  refreshmaxwait command line flag may be used to control the maximum wait time.  For more information about meta refresh, read about it in Wikipedia.

By default, images captured from the command line are saved to Firefox's Download Folder.  You can set this location from the Downloads section of the Firefox Options window.  In Page Saver Pro, the -saveas command line flag may be used to specify the file path where images are saved (see below).

If Firefox is not running, it will exit after saving the image.

For more information about using Firefox from the command line, refer to this mozillaZine article.

Controlling the Command Line Image Capture Process

To control the size of the browser window that is opened, use the -width and -height flags to specify the window width and height in pixels.  For example:

firefox -saveimage http://www.mozilla.org/ -width 800 -height 600

To specify a delay before capturing a page, use the -savedelay flag (this is useful for pages that add content after the initial page load is complete).  The delay specified is in milliseconds.  For example, to specify a one second delay, use a command such as:

firefox -saveimage http://www.mozilla.com/ -savedelay 1000

To capture Flash content, include the -captureflash flag (this is an alternative to checking the arrange to capture Flash content box in the Page Saver Options).  For example:

firefox -saveimage http://www.adobe.com/ -savedelay 1000 -captureflash
This flag requires Firefox 3 and is not needed on Mac OS.  Using it may cause some pages that contain Flash content to load incorrectly.

PROIn Page Saver Pro, include the -saveas flag on the command line to specify a directory, a file, or a server location (URL) where the image will be saved.  You may also specify the word clipboard to place a copy of the captured image on the system clipboard (on Linux, this feature requires Firefox 3).  Here is an example that uses a file path:

firefox -saveimage http://www.mozilla.org/ -saveas /tmp/moz.png
The path is a platform-specific path; therefore, it needs to be specified using the form that is appropriate for the system where Firefox is running.  For example, on Windows you should use a path like c:\moz.png and on Linux and Mac OS X you should use a path like /tmp/moz.png.

You may also use a file name pattern to specify the file name.  For example, to include the page title in the file name, use a command like this:

firefox -saveimage http://pearlcrescent.com/ -saveas "/tmp/%t.png"

To save to the clipboard, use a command like this:

firefox -saveimage http://www.mozilla.org/ -saveas clipboard

To upload the captured image to a server, specify an ftp://, http://, or https:// URL using the -saveas flag.  If a password is needed and it has not been saved in the Firefox Password Manager, you will need to include the password in the URL.  For example:

firefox -saveimage http://flickr.com/ -saveas ftp://joe:secret@example.com/upload/

By default, Page Saver will append a file name to the URL before uploading the captured image using FTP or HTTP PUT.  However, if the URL ends with .png, .jpg, or .jpeg it will be used "as is" to upload to a specific file.  For example, to upload a captured image to a file named img42.png, use a command similar to the following:

firefox -saveimage http://flickr.com/ -saveas http://example.com/img42.png

PROIn Page Saver Pro, the -saveoptions command line flag may be used to control additional aspects of the image capture process.  Separate multiple options with a comma.  The available options are:
  • visible — capture the visible portion of the page instead of the entire page.
  • maxwait=ms — wait at most ms milliseconds for the page to load.  A slow page load is stopped and an image of the partially loaded page is captured.
  • refreshmaxwait=ms — wait at most ms milliseconds for a page that contains a meta refresh directive to load the next page.
  • delay=ms — wait an extra ms milliseconds after the page has finished loading before capturing the image (this works the same as the -savedelay flag).
  • top=pixelval — omit from the captured image the first pixelval pixels along the top of the page.
  • left=pixelval — omit from the captured image the first pixelval pixels along the left side of the page.
  • bottom=pixelval — crop the captured image along the bottom at pixelval pixels.
  • right=pixelval — crop the captured image along the right side at pixelval pixels.
  • element=elementID — capture the region occupied by the first DOM element on the page with an id of elementID.  If more than one element=elementID value is included in -saveoptions then each element will be captured as a separate image.  If no element with the ID specified exists within the page, then no image is captured and an error is reported.  Tip: to include the element ID in the name of the image files that are saved, add %i to the the file name pattern (located on the Image Capture tab within the Page Saver Pro options window).
  • scale=scaleval — reduce or limit the size of the captured image.  If scaleval ends with a % character, the image is scaled to the specified percentage.  If scaleval is a simple integer, the largest dimension of the resulting image will be at most scaleval pixels.
  • format=imagetype — use imagetype as the output format when saving images to a local file or to a server.  The choices for imagetype are:
    • png
    • png@transparency=none (PNG format without transparency information)
    • jpeg
    • jpeg@quality=Q (JPEG format with a quality of Q — ranging from 0 to 100)
Additional Command Line Examples
Save an image of the getfirefox.com page using a browser window that is 600 pixels wide, waiting 1/2 a second after the page loads before capturing it:
firefox -saveimage http://getfirefox.com/ -width 600 -savedelay 500

PROSave a 300 pixel thumbnail image of the visible portion of the mozilla.org page using a browser window that is 800x600 pixels wide:
firefox -saveimage http://mozilla.org/ -width 800 -height 600 -saveoptions visible,scale=300

PROSave an image of the “top tags” portion of the Technorati main page to a file named /tmp/toptags.png:
firefox -saveimage http://technorati.com/ -saveoptions element=sb-toptags -saveas /tmp/toptags.png

PROSave a high quality JPEG image of a Flickr page that shows photos tagged with the term “lighthouse”:
firefox -saveimage http://flickr.com/photos/tags/lighthouse/ -saveoptions format=jpeg@quality=100

PROPlace an image of the Apple, Inc. Yahoo! Finance page on the system clipboard:
firefox -saveimage "http://finance.yahoo.com/q?s=AAPL" -saveas clipboard

PROUpload a half-size image of the top 500 pixels of the Google News page to an HTTP server:
firefox -saveimage http://news.google.com/" -saveoptions bottom=500,scale=50% -saveas http://jill:secret@example.com/myfiles/
Determining Whether a Capture Succeeded

Each time Page Saver is run from the command line, it will write a one-line status message to the standard error stream.  The status message will consist of the text PageSaver:CaptureComplete followed by an integer result code and an optional text string that provides more detailed information.  For example, for a successful capture the message might look like this:

PageSaver:CaptureComplete 0 (success)-HTTP:200

On Microsoft Windows, you must start Firefox with the -console flag to see the Page Saver status messages.  Since Page Saver opens a new window for each capture and closes it after the capture is done, while you are experimenting with various Page Saver command line flags you may want to first start a copy of Firefox with the -console flag only and then run additional Firefox commands that include Page Saver options.  For example:

cd "c:\Program Files\Mozilla Firefox"
firefox -console
firefox -saveimage http://www.mozilla.org/
firefox -saveimage http://getfirefox.com/ -savedelay 2000
...

Table 1 lists all of the the result codes that may be returned in the PageSaver:CaptureComplete messages.

Result CodeDescription
0The image capture was successful. Extra information may be included (see below).
3An invalid parameter was specified.
4The Page Saver canvas is not available.  This could occur if both the Location Bar and Activity Indicator have been removed from the Firefox toolbar.
5A error occurred while trying to draw an image of the page content.
6A error occurred while trying to extract the image data so it could be saved.
7The destination file path is invalid.
8An error occurred while writing to the destination file.
9An error occurred while uploading an image to a server.
10An error occurred while trying to copy an image to the system clipboard.
11An element=elemid option was used but no page element exists with the ID elemid.
12Request error.  The web page could not be loaded because the server could not be contacted or another error occurred.  Detailed error information will be included (see below).
Table 1 — Command Line Result Codes

Here is another example:  if the -saveas option is used in Page Saver Pro and an invalid file path is provided, the status line will contain a result code of 7:

PageSaver:CaptureComplete 7 (failure)-[Exception... NS_ERROR_FILE_NOT_FOUND ...]
Extra Information Provided with Result Code 0 (Success)

For successful requests, the PageSaver:CaptureComplete message will include the HTTP status code (if available) in the form HTTP:statuscode (where statuscode is replaced by 200, 404, and so on).

In addition, if the meta-refresh maximum wait time was exceeded, the text refreshmaxwait will be included (separated from other information by a comma).

If the maximum page load time was exceeded, the text maxwait will be included (separated from other information by a comma).

For example:

PageSaver:CaptureComplete 0 (success)-HTTP:200,maxwait

Extra Information Provided with Result Code 12 (Request Error)

When a command line capture fails with Result Code 12 (request error), the PageSaver:CaptureComplete message will include detailed error information.  First, a hexadecimal Mozilla error code will be output.  For common errors, the name of the error will also be output.  Here are some examples:

PageSaver:CaptureComplete 12 (failure)-0x804b001e NS_ERROR_UNKNOWN_HOST
PageSaver:CaptureComplete 12 (failure)-0x804b000d NS_ERROR_CONNECTION_REFUSED
PageSaver:CaptureComplete 12 (failure)-0x805d001e NS_ERROR_MALWARE_URI
PageSaver:CaptureComplete 12 (failure)-0x804b001f NS_ERROR_REDIRECT_LOOP

The most common Mozilla errors are defined in these two source code files:

Customizing Page Saver
You may customize Page Saver's behavior by adjusting various options.  Use one of the following two methods to open the Page Saver options window:

Page Saver General Options
Figure 4 — Page Saver Pro General Options
  • Choose Page Saver Options... from the menu associated with the Page Saver toolbar item.
  • Open the Firefox Add-ons window and double-click on Pearl Crescent Page Saver Basic or Pearl Crescent Page Saver Pro.
Use the General tab (shown in Figure 4) to control which portion of the page is captured by default, to set keyboard shortcuts, and to control which Page Saver items appear in the browser context menu.  In order for changes to the keyboard shortcut settings to take effect, you need to open a new window or restart Firefox.

Use the Image Capture tab (shown in Figure 5) to specify a pattern for file names, to choose whether or not to be prompted for the file name and location, to choose whether or not to overwrite existing local files, to limit the size of saved images, to set the image format and its corresponding options, and to choose whether a sound is played after capturing each image.

On Windows and Linux, you can arrange to capture Flash content by checking the appropriate box. Learn more.

Page Saver Image Capture Options
Figure 5 — Page Saver Pro Image Capture Options
The file name pattern is used by Page Saver to construct the file name.  The following character sequences are replaced with values taken from the page title, page URL, and the date and time of the capture:
  • %t — the page title (replacing characters that cannot be used in file names with a hyphen).
  • %Y — the year, e.g., 2009.
  • %m — the month, e.g., 10 for October.
  • %d — the day of the month, e.g., 31 for the 31st day of the month.
  • %H — the hour using a 24 hour clock, e.g., 23 for 11pm.
  • %M — minutes.
  • %S — seconds.
  • %u — the page URL (location).
  • %5 — an MD5 hash of the page URL.  This is useful when integrating with services such as the del.icio.us JSON feeds.
  • PRO%i — element ID specified on command line.
  • %% — a '%' character.

The prompt checkbox will determine whether you will be prompted before saving an image to a local file.  If the overwrite checkbox is checked, existing files are overwritten without prompting; if it is not checked, Page Saver will generate a unique file name by appending (1), (2), etc. to the name.  The overwrite option is only consulted if the prompt checkbox is not checked or if Page Saver is invoked from the command line.

If JPEG format is chosen, you may specify the image quality which is an integer value that ranges from 0 to 100 (with 100 providing the best quality).  Since JPEG uses lossy compression while PNG uses lossless compression, PNG is a better choice when the best quality image is needed.

Page Saver Pro Header and Footer Options
Figure 6 — Page Saver Pro Header and Footer Options
PROIn Page Saver Pro, use the Header and Footer tab (shown in Figure 6) to include a header or footer in each captured image.

The header and footer text patterns accept the same formatting characters as the file name pattern (located on the Image Capture tab).

There are also four hidden preferences that control the height and text format for the header and footer:

  • pagesaver.header.height
    height of header in pixels.
  • pagesaver.header.style
    CSS format for header text.
  • pagesaver.footer.height
    height of footer in pixels.
  • pagesaver.footer.style
    CSS format for footer text.
These hidden preferences may be modified using Firefox's about:config advanced configuration editor.

Page Saver Pro Destination Options
Figure 7 — Page Saver Pro Destination Options
PROIn Page Saver Pro, use the Destination tab (shown in Figure 7) to choose a destination for captured images (a local file, your computer's clipboard, or a server), and to enter the location, user name, and password for an HTTP, HTTPS, or FTP server.  HTTP servers must be configured to accept PUT requests.

By default, Page Saver will append a file name to the URL before uploading each captured image. However, if the URL ends with .png, .jpg, or .jpeg it will used "as is" and all captured images will be uploaded to the same location.

Known Issues and Limitations
  • Page content generated by plugins may not be included in saved images.  This is caused by a limitation in Firefox; see Mozilla bug 313462.
    However, Flash-based content can be captured in Firefox 3.  Learn more.
  • If a page contains frames or iframes, when the entire page is captured only the visible portion of each frame is included.  To capture the entire contents of a frame, choose the frame from the Save Image of Entire Frame menu within the Page Saver toolbar menu, or use the Save Image of This Entire Frame... browser context menu item.
  • On Windows and Mac OS, the largest dimension of saved images is 32,767 pixels (width or height).  On Linux, the limit is 32,766 pixels.  Images of larger pages are cropped.
  • On Linux, saving an image to the clipboard is not supported in Firefox 2.
  • When saving images to an FTP server in Page Saver Pro, sometimes an error message is not displayed when it should be (especially when the image is small).
  • When capturing pages from the command line, web pages that display modal dialog boxes may prevent Page Saver from closing the browser window (effectively stalling Page Saver).  For example, this occurs when a web page calls the JavaScript confirm() function.  Pearl Crescent Do Not Disturb provides a solution to this and similar problems.
  • Only one page capture may be processed at a time.  When running from the command line, wait for the PageSaver:CaptureComplete message before issuing the next capture command.
  • If the Tab Mix Plus extension is installed and its “Single Window Mode” option is enabled, Page Saver will not capture images when run from the command line.  To avoid this problem, disable Single Window Mode or uninstall Tab Mix Plus.
  • If you are using the Google Analytics site and have Page Saver's Arrange to Capture Flash Content option checked, Google's date range selector is not displayed correctly.  To avoid this problem, temporarily uncheck the Arrange to Capture Flash Content option and reload the Google Analytics page.
Additional Assistance
If you need more help or have a suggestion for us, please send email or use our feedback form.
Other Information
Page Saver Basic Extension GUID:
{c151d79e-e61b-4a90-a887-5a46d38fba99}
Page Saver Pro Extension GUID:
{7e5323bb-4c75-4c7e-8383-612a65a6d61e}

Authors and Contributors:
  • Kathleen Brade
  • Mark Smith
  • Tomas Marek (cs-CZ locale)
  • Finn Sørensen (da-DK locale)
  • Wawuschel, Team erweiterungen.de (de-DE locale)
  • Demetris Kikizas op111.net (el-GR locale)
  • Urko (es-ES locale)
  • Jean-Bernard Marcon (fr-FR locale)
  • Robert Martucci, Underpass, www.extenzilla.org (it-IT locale)
  • Norah Marinkovic (ja-JP locale)
  • Hunmin Kim (ko-KR locale)
  • Markh (nl-NL locale)
  • vatzec (pl-PL locale)
  • Eduardo Rapoport, Rodrigo Bergmann Laurindo (pt-BR locale)
  • Alexander Sokolov (ru-RU locale)
  • SlovakSoft (sk-SK locale)
  • Martin Srebotnjak (sl-SI locale)
  • KenanBalamir, doctor_jivago (tr-TR locale)
  • Myroslav Holyak (uk-UA locale)
  • Xiao Wenming, fiag (zh-CN locale)
  • Jia Heui, Lin; Rex Tsai; Unicorn2 (zh-TW locale)
Subscribe to our announcement list.
Copyright © 2005-2009 Pearl Crescent, LLC.