Download Latest Version gsSetInitialView-2.0.0-portable.zip (1.6 MB)
Email in envelope

Get an email when there's a new version of gsSetInitialView

Home
Name Modified Size InfoDownloads / Week
docs 2023-08-15
gsSetInitialView-2.0.0-source.zip 2023-08-15 44.4 kB
gsSetInitialView-2.0.0-portable.zip 2023-08-15 1.6 MB
readme.md 2023-08-15 7.8 kB
gswin64c-9.55.0-bin.zip 2022-04-07 13.5 MB
gswin32c-9.55.0-bin.zip 2022-04-07 12.9 MB
Totals: 6 Items   28.2 MB 10

gsSetInitialView

Latest Version: 2.0.0
Date: 14 Aug 2023
Platform: Windows Function: GUI to set PDF initial view using Ghostscript and pdfmarks
Project Site: https://sourceforge.net/projects/gssetinitialview/
Developer: David King (dking02)
IDE: Delphi 10.2 (Tokyo)
License: GNU General Public License (GPL), version 3
Dependencies: Ghostscript release 9.55 or earlier; installed PDF viewer

Description

This project provides a free and open-source (FOSS) GUI application to set the initial view property of a PDF file. The GUI allows for user selection of initial view settings (navigation pane, page layout, zoom, etc.), generates a text file containing a snippet of corresponding PostScript code (pdfmark), and then runs the Ghostscript (gs) command line program to apply the pdfmark to the PDF file.

Screenshots of the program are available on the project's Summary page.

For my other free, GUI PDF tools on SourceForge, see PDFtk Builder Enhanced, PDFtk Bookmarks Editor and cpdfSetInitialView.

Usage

The GUI is more-or-less self-explanatory. However, please note the following:

  • By default, only the most frequently used initial view settings are displayed in the GUI. For all available settings, check the "Show all options" box.
  • If you do overwrite the source PDF file and do not like the result, you can click the "Undo" button to restore the original file.
  • The GUI includes an advanced option ("Review pdfmark") to pause execution and display the generated pdfmark in a text editor before passing it on to Ghostscript for execution. While originally used for test and debugging, this feature has been left in the GUI and provides a generic capability to apply pdfmarks to a PDF file. To continue execution after pausing, close the text editor and acknowledge the "OK when ready to proceed" message from the program.
  • How a PDF reader handles the initial view property is dependent on the capabilities of the reader and preferences the user may have configured in the reader. For example, some lightweight PDF readers, like SumatraPDF, are unable to render page thumbnails and cannot display a thumbnail (pages) navigation pane, even though it is set in the initial view property of the PDF. Other readers may allow the user to override the initial view.
  • Avoid using this program to set the initial view property of PDFs that contain embedded files (attachments) or optional content (OC/layers). Ghostscript will not preserve those features when applying pdfmarks or performing some other pdf-to-pdf operations. If you are unsure whether your source PDF contains attachments or OC, you can check the file via the "View Source" button before clicking the "Update PDF" button to apply the selected initial view settings.
  • The latest release of Ghostscript that is compatible with gsSetInitialView is release 9.55.0 (Sep 2021). Therefore, ensure that you maintain a copy of the executables from gs release 9.55.0 (or earlier) for use with gsSetInitialView when installing a new release of Ghostscript. Later releases of Ghostscript are incompatible due to their use of a new PDF interpreter that does not retain the ability to process pdf*marks.
  • cpdfSetInitialView v2.0.0 is a sister application to gsSetInitialView which shares a common GUI and source code base but uses a different command line tool (cpdf). Effective with v2.0.0 (Aug 2023), the cpdf-based GUI is the preferred application for setting the initial view since it is not affected by the limitations of Ghostscript described above.

Additional information is provided in the User Manual (.pdf) that is included with the program.

Getting Started

This project is distributed as a portable 32-bit application for Windows and is licensed under terms of the GNU GPL, version 3.

Two download files are available:

(1) Executables and User Documentation (also includes pdfinfo.exe but not Ghostscript binaries)
gsSetInitialView-2.0.0-portable.zip

(2) Source code (Delphi 10.2)
gsSetInitialView-2.0.0-source.zip

Download gsSetInitialView-2.0.0-portable.zip and extract its contents to a folder of your choice.

The getSetInitialView distribution does not include required Ghostscript executables. If gs 9.55.0 (or earlier) is installed on your system, (a) copy files gswin32c.exe and gsdll32.dll or files gswin64c.exe and gsdll64.dll to your gsSetInitialView folder or (b) edit the program's default .ini file to add the path to the gs command line executable. If the required gs executables are not available, download copies of the two files for gs release 9.55.0 from the gsSetInitialView Files page on SourceForge or perform a full install of gs 9.55.0 by downloading its setup file from the Ghostscript downloads repository on Github. Either 32-bit or 64-bit versions of the gs files may be used. See the User Manual for further details.

Launch gsSetInitialView by double-clicking its .exe file (gsSetInitialView.exe). The .exe file is not code-signed so Windows will flag it as risky the first time it is run. The source PDF file may be selected via drag-and-drop onto the GUI, file open dialog, or several other methods as described in the User Manual.

Documentation

The distribution includes a User Manual (.pdf) which can be accessed directly from the gsSetInitialView \docs subfolder or opened from the Help menu within the program. The program's commented configuration (.ini) file is located in the program folder and can be edited with a text editor. It can also be accessed from the File menu of the program for viewing or editing. The program must be exited and restarted to reload the .ini file if the file has been modified.

Acknowledgements

  • Glyph & Cog, LLC - for GPL release of Xpdf tool pdfinfo, executable included in the distribution
  • Artiflex Software, Inc. - for availability of Ghostscript AGPL release for Windows
  • Embarcadero, Inc. - for free license of Delphi 10.2 Tokyo Starter Edition used for this FOSS project


Version History

1.0.0, 02 Jun 2021

  • Initial release of Ghostscript-based version of SetInitialView
  • (07 Apr 2022) User manual and readme files updated to document the required use of gs release 9.55.0 or earlier. No change to program code

2.0.0, 14 Aug 2023

  • Add pdfinfo report for output PDF files
  • Make user confirmation for program to delete unused backup files optional
  • Identify version of gs being used by the program in the Help>About message to support version check by user
  • This release was developed in Delphi 10.2 and tested on Windows 10 and Windows 11 Pro 22H2 x64 using Notepad and Adobe Reader v11.0.23 as .txt and .pdf file viewers.
Source: readme.md, updated 2023-08-15