Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Tutorial for installing ghostscript/ghostview/pstoedit to remove PDF copy & password protection , downconvert, rotate pages, change paper sizes, fix corruption, extract text, etc.

426 views
Skip to first unread message

Arlen Holder

unread,
Oct 15, 2020, 5:27:58 PM10/15/20
to
As always, so that every action benefits everyone, here is a step-by-step
tutorial for installing ghostscript/ghostview/pstoedit to remove
protection, downconvert versions, fix corruption, rotate pages,
extract pages, extract text, remove passwords, change paper sizes, etc.

Based on lessons learned by trial and error in a variety of threads:
o Have you tried to install the latest Ghostscript/Ghostview/pstoedit lately?
<https://groups.google.com/forum/#!topic/comp.text.pdf/UI-xhABnyFY>

Note: Normally I never let a thousand different programmers decide
the hundreds of different places they would put their software, where I
opt, instead, to choose the one place I'd put all thousand software
installs. By definition, that's where they belong.
o c:\apps\{archivers,browsers,cleaners,databases,editors,finance,games,etc.}

In addition, I maintain a logical sensible hierarchy that matches itself
on all machines in my control, which lasts intact for decades in daily use:
o The installer archive matches the installed hierarchy which matches the menu tree

The software matches the installed hierarchy which matches the menu!
ARCHIVED: C:\software\editor\pspdf\{ghostscript,ghostview,ps2edit}
INSTALLED: C:\apps\editor\pspdf\{ghostscript,ghostview,ps2edit}
MENU: C:\menu\editor\pspdf\{ghostscript,ghostview,ps2edit}
TASKBAR: menu > editor > pspdf > {ghostscript,ghostview,ps2edit}.lnk

To that end, I deleted & re-installed the ghostscript/ghostview/pstoedit
programs where they belong (i.e., as defined by me), and they worked
just fine in the user-defined custom location where they rightly belong.
o Ghostscript <https://sourceforge.net/projects/ghostscript/>
Note: Your limiting factor is you need an older ghostscript version.
<https://github.com/ArtifexSoftware/ghostpdl-downloads/releases>
o Ghostview <http://www.ghostgum.com.au/software/gsview.htm>
Note: You can use the latest Ghostview versions.
o pstoedit <https://sourceforge.net/projects/pstoedit/>
Note: You can use the latest pstoedit versions.

Hence here's a writeup that others can use where they need only
substitute the location they feel the software belongs on their PC
(as defined by the user).

NOTE: WinXP users simply use the 32-bit installer instead of 64-bit.
Note: Linux users can simply use the Linux installers.

1. Create a location for the downloaded installers in your archive:
mkdir c:\software\editor\pspdf\{ghostscript,ghostview,ps2edit}
2. Create a location for the installed programs in your app hierarchy:
mkdir c:\apps\editor\pspdf\{ghostscript,ghostview,ps2edit}
3. Create a location for the menu to point to those installed programs:
mkdir c:\menu\editor\pspdf\ghostscript,ghostview,ps2edit}
Note: This custom menu is attached to your taskbar & as such,
your menu replaces the Windows Start menu in its entirety.
4. Download Artifex GPL Ghostscript version 9.07:
<https://sourceforge.net/projects/ghostscript/>
<https://sourceforge.net/projects/ghostscript/files/>
<https://sourceforge.net/projects/ghostscript/files/GPL%20Ghostscript/>
<https://sourceforge.net/projects/ghostscript/files/GPL%20Ghostscript/9.07/>
<https://sourceforge.net/projects/ghostscript/files/GPL%20Ghostscript/9.07/gs907w64.exe/download>
<https://master.dl.sourceforge.net/project/ghostscript/GPL%20Ghostscript/9.07/gs907w64.exe>
Name: gs907w64.exe
Size: 12975660 bytes (12 MiB)
SHA256: B2C0BE0A963A215EC0343D73B2F3FFD4D4CD87AE21C78CB17F72F248689BE316
Location: c:\software\editor\pspdf\ghostscript\gs907w64.exe
WARNING: The latest Ghostscript does NOT work with the latest GhostView!
NOTE: However, a newer version of Ghostscript than 9.07 may likely work.
[The only way to tell is by trial and error of the available versions.]
5. Download Ghostgum GhostView version 5.0:
<http://www.ghostgum.com.au/software/gsview.htm>
<http://www.ghostgum.com.au/download/gsv50w64.exe>
Name: gsv50w64.exe
Size: 2176512 bytes (2125 KiB)
SHA256: 80D0161ABBB3CFB0FF08F3787C4959B8A41585EF1470DAE4AEA20341820D49AF
Location: c:\software\editor\pspdf\ghostview\gsv50w64.exe
Note: The latest version of ghostview should also work.
6. Download Ghostgum pstoedit version 3.62:
<https://sourceforge.net/projects/pstoedit/>
<https://sourceforge.net/projects/pstoedit/files/pstoedit/>
<https://sourceforge.net/projects/pstoedit/files/pstoedit/3.62/>
<https://sourceforge.net/projects/pstoedit/files/pstoedit/3.62/pstoeditsetup_x64.exe/download>
<https://master.dl.sourceforge.net/project/pstoedit/pstoedit/3.62/pstoeditsetup_x64.exe>
Name: pstoeditsetup_x64.exe
Size: 1410584 bytes (1377 KiB)
SHA256: 5ED63D29ECA150A26FE689664A9422DCAB11E467544B39241690FF25AB790AE1
Location: c:\software\editor\pspdf\ps2edit\pstoeditsetup_x64.exe
Note: The latest version of ps2edit should also work.
7. Install Artifex GPL Ghostscript version 9.07 [gs907w64.exe]:
It asks to go in: C:\Program Files\gs\gs9.07
I put it where it belongs: C:\apps\editor\pspdf\ghostscript
8. Copy the shortcut to ghostscript into your custom taskbar menu:
FROM: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Ghostscript\Ghostscript 9.07.lnk
TO: c:\menu\editor\ps2pdf\Ghostscript 9.07.lnk
TARGET=C:\apps\editor\pspdf\ghostscript\bin\gswin64.exe "-IC:\apps\editor\pspdf\ghostscript\lib;C:\apps\editor\pspdf\ghostscript\..\fonts"
STARTIN=C:\apps\editor\pspdf\ghostscript
9. Install Ghostgum GhostView version 5.0 [gsv50w64.exe]:
It asks to go in: C:\Program Files\Ghostgum
I put it where it belongs: c:\apps\editor\pspdf\ghostview
10. Copy the shortcut to ghostview into your custom taskbar menu:
FROM: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Ghostgum\GSview 5.0.lnk
TO: c:\menu\editor\ps2pdf\GSview 5.0.lnk
TARGET=C:\apps\editor\pspdf\ghoststuff\ghostview\gsview\gsview64.exe
STARTIN=<blank>
11. Install Ghostgum pstoedit version 3.62 [pstoeditsetup_x64.exe]:
It asks to go in: C:\Program Files\pstoedit
I put it where it belongs: C:\apps\editor\pspdf\ghoststuff\pstoedit
12. Start Ghostview to convert your input PDF file as desired:
Taskbar > menu > editor > pspdf > GSview 5.0.lnk
Press [Ok] when asked to proceed in a mandatory registration nag popup.
GSview:File > Open > fname.pdf
GSview:File > Convert (pdfwrite, 600dpi, all pages, ok) > newfname.pdf
Note the temporary "GSview print" popup as the pages are converted.
GSview:File > Exit

RESULTS:
The old file "File > Properties > Description" was the file name.
The converted file said "Ghostscript wrapper for C:\converted_fname.pdf"
[Note: I easily changed that back with the Adobe Acrobat writer.]

In Adobe Acrobat 6.0 (the writer), the original file
"File > Document Properties > Security" permissions were all
"Not Allowed", while the converted file were all "Allowed".
<https://i.postimg.cc/3RSrbwLP/convertpdf02.jpg>

It's important to note that the Adobe Acrobat DC (reader) does _not_
provide an "accurate" assessment of the security properties
"File > Properties > Security" where some are showed as "not allowed"
<https://i.postimg.cc/2y1jpfM3/convertpdf03.jpg>
But it's close enough if you know what they're trying to tell you.

NOTE: There are many other conversion capabilities this affords the user:
o Display and print PostScript and PDF files.
o View pages in arbitrary order (Next, Previous, Goto).
o Page size and Orientation are automatically selected from DSC comments
o Page size and Orientation can be selected using the menu.
o Print selected pages using Ghostscript.
o Convert pages to bitmap, PDF or PostScript.
o Selectable display resolution, depth, alpha.
o Single button zoom.
o Extract selected pages to another file.
o Copy display bitmap to clipboard.
o Save clipboard bitmap as BMP file.
o Add bitmap or user preview to EPS file
o Graphically select and show bounding box for EPS file.
o Extract bitmap preview or PostScript from DOS EPS file.
o Extract text or search for text.
o Can read gzip and bzip2 compressed PostScript and PDF files.
--
As always, please improve so that all benefit from your every post.

Arlen Holder

unread,
Nov 7, 2020, 3:19:08 AM11/7/20
to
On Thu, 15 Oct 2020 21:27:56 -0000 (UTC), Arlen Holder wrote:

> 12. Start Ghostview to convert your input PDF file as desired:
> Taskbar > menu > editor > pspdf > GSview 5.0.lnk
> Press [Ok] when asked to proceed in a mandatory registration nag popup.
> GSview:File > Open > fname.pdf
> GSview:File > Convert (pdfwrite, 600dpi, all pages, ok) > newfname.pdf
> Note the temporary "GSview print" popup as the pages are converted.
> GSview:File > Exit

A real world current test case is shown below for illustrative purposes.

In another thread, Paul & I were discussing our respective 48-pin square
(12x12 audio chips on our respective motherboards, Paul's being an Analog
Devices AD1988A audio chip & mine being the Realtek ALC888S audio chip.
o <https://i.postimg.cc/44HsVbX0/48pinu6.jpg>

In that discussion, I needed to copy & paste from the respective PDFs:
o <https://www.hardwaresecrets.com/datasheets/ALC888S_DataSheet_1.2.pdf>
o <https://www.hardwaresecrets.com/datasheets/AD1988A_1988B.pdf>

Unfortunately, the original Realtek PDF wouldn't allow copy and paste:
o Printing: Allowed
o Changing the Document: Not Allowed
o Document Assembly: Not Allowed
o Content Copying or Extraction: Not Allowed
o Content Extraction for Accessibility: Not Allowed
o Commenting: Not Allowed
o Filling of form fields: Not Allowed
o Signing: Not Allowed
o Creation of Template Pages: Not Allowed

Hence, I used the method described in this tutorial to fix that
(with the minor but important page-size changes shown below):
12. Start Ghostview to convert your input PDF file as desired:
o Taskbar > menu > editor > pspdf > GSview 5.0.lnk
(C:\app\editor\pspdf\ghoststuff\ghostview\gsview\gsview64.exe)
o Press [Ok] when asked to proceed in a mandatory registration nag popup.
o GSview:File > Open > ALC888S_DataSheet_1.2.pdf
o GSview:File > Convert (pdfwrite, 300dpi, all pages, ok) > newfname.pdf
Note: The default [Fixed Page Size] gave output with cut-off pages!
Note: Changing that to [Shrink to fit Page Size] worked much better.
Note: Changing to [Variable Page Size] also seemed to work better.

With the resulting permission inside of Adobe Acrobat 6 (writer) of:
o Printing: Allowed
o Changing the Document: Allowed
o Document Assembly: Allowed
o Content Copying or Extraction: Allowed
o Content Extraction for Accessibility: Allowed
o Commenting: Allowed
o Filling of form fields: Allowed
o Signing: Allowed
o Creation of Template Pages: Allowed
Note: Not all those show up as "allowed" unless your editing tool itself
allows it, where the editing tool I used was Adobe Acrobat 6 (writer).

Confusingly, Adobe Acrobat DC (reader) shows _different_ permissions
(for the exact same Not-Allowed-to-Allowed converted file above):
o Printing: Allowed
o Document Assembly: Not Allowed
o Content Copying: Allowed
o Content Copying for Accessibility: Allowed
o Page Extraction: Not Allowed
o Commenting: Allowed
o Filling of form fields: Allowed
o Signing: Allowed
o Creation of Template Pages: Allowed

In summary, this is a real world current test case where this tutorial was
needed, and which I referenced, but which had to be slightly modified so
that the result didn't truncate the top of each page in initial results.

Note: I'm not at all sure _why_ the conversion truncated the top of the
pages of the original Realtek PDF occurred with the default settings of
o [Fixed Page Size]
--
For reference, see this thread where the PDF copy & paste was needed:
o Typical first pass tutorial process on Windows 10 where NONE of the
extent how to articles actually tell you what you really need to do!
<https://groups.google.com/forum/#!topic/alt.comp.microsoft.windows/fXrtth_A1xg>

Bob Zwaska

unread,
Jun 7, 2021, 10:33:19 AM6/7/21
to
I tried following the tutorial, but it looks like gs version 9.07 was removed from sourceforge!!!

This seems like a disaster, aren't there a large number of people trying to use gsview?

Chris Koen

unread,
Jun 14, 2021, 4:34:25 PM6/14/21
to
On Monday, June 7, 2021 at 4:33:19 PM UTC+2, Bob Zwaska wrote:
> I tried following the tutorial, but it looks like gs version 9.07 was removed from sourceforge!!!
>
> This seems like a disaster, aren't there a large number of people trying to use gsview?
Try
https://ftp.neuralsoft.com/Download/ASP/GhostScript%209.07/

--


Disclaimer - This e-mail is subject to UWC policies and e-mail disclaimer
published on our website at: https://www.uwc.ac.za/disclaimer
<https://www.uwc.ac.za/disclaimer>


0 new messages