|
|||||||||||||||||||||||||
|
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.
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:
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:
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:
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.
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/? 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"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 600To 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 1000To 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 -captureflashPROIn 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.pngc:\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 clipboardTo 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:
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:200On 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"Table 1 lists all of the the result codes that may be returned in the PageSaver:CaptureComplete messages.
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
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:
Figure 4 — Page Saver Pro
General Options
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.
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:
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.
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:
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
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:
|
||||||||||||||||||||||||
Subscribe to our announcement list. |