Tag Info

Hot answers tagged

6

From http://blog.chewearn.com/2008/12/18/rearrange-pdf-pages-with-pdftk/ pdftk A=src.pdf B=blank.pdf cat A1 B1 A2-end output res.pdf Hope you like this script, just save it as pdfInsertBlankPageAt.sh, add execute permissions, and run. ./pdfInsertBlankPageAt 5 src.pdf res.pdf #!/bin/bash if [ $# -ne 3 ] then echo "Usage example: ./pdfInsertBlankPageAt ...


5

Use a command like: gs -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -dSAFER -sOutputFile=sin_800.pdf *.eps


5

I'd do it with pdftk. pdftk A=all.pdf cat Aodd output odd.pdf pdftk A=all.pdf cat Aeven output even.pdf


5

The gs example The gs command you're running above has a trailing $1 which is typically meant for passing command line arguments into a script. So I'm not sure what you actually tried but I'm guessing that you tried to put that command into a script, script.sh: #!/bin/bash gs -sOutputFile=output.pdf \ -q -dNOPAUSE -dBATCH -dSAFER \ ...


4

Apparently it's not possible to keep the PDF metadata when using ghostscript. Here is a workaround which first saves the metadata to a file using pdftk, then compresses the file with ghostscript and finally writes back the metadata also using pdftk. INPUTPDF=<input_file> OUTPUTPDF=<output_file> TMPPDF=$(mktemp) METADATA=$(mktemp) # save ...


4

I decided to write a simple script to generate a tex file that includes eps file arguments (using \includegraphics[width=\columnwidth]{arg1.eps} ...). Then using latex, and dvipdf I can get a pdf file with multiple eps files on a page.


2

I merged a handful of pdf's into a single document using pdftk *.pdf output all.pdf. So that leaves you with a converting EPS documents to PDF: How to convert PDF to EPS?


2

You can check-out pdfdraw from mupdf (package mupdf-tools under Debian/Debian-derivatives). From its description: pdfdraw will render a PDF document to image files. The supported image formats are: pgm, ppm, pam and png. Select the pages to be rendered by specifying a comma separated list of ranges and individual page numbers for example: ...


2

I found a script here that can do this. It requires gs which you seem to have but also pdftk. You have not mentioned your distribution but on Debian-based systems, you should be able to install it with apt-get pdftk You can find RPMs for it here. Once you have installed pdftk, save the script as graypdf.sh and run like so: ./greypdf.sh input.pdf It ...


2

Here is how I would remove the OCR-ed text should I have to... First, you need to know, that OCR-ed text in a PDF is not a layer, but a special text rendering mode. The following screenshot from the official PDF specification lists all available text rendering modes: For more background, please see these answers of mine on StackOverflow: "How can we ...


2

There are multiple ways to get rid of the OCRed text in the file. Export the scanned images from the PDF and recombine them. You can use pdfimages for the extraction (from the poppler-utils package) and convert (from imagemagick) to convert them back: pdfimages toc.pdf toctmp convert toctmp*.pbm newtoc.pdf Print to PDF (with PDF support from cups-pdf) ...


2

This is the pseudo solution I used, now. My editor didn't seem to care whether to receive eps or tiff files, so I rendered all svgs with the target resolution and size, as it was impossible to get a decent result with eps files (as noted in the comments this is due to technical limitations of the eps format). This can be done by opening the svg directly in ...


1

0. Here is a PNG made from your one page sample PDF file: 1. When viewing it in any PDF viewer, the page's width is greater than the height. This is exactly as it's supposed to be. 2. [...] it seems like all the PDF applications I have tried mistake the width as the height and the height as the width for this PDF file. As you said, it only ...


1

When I tried to access the link to your sample scanned file earlier, it didn't work for me. However, meanwhile I downloaded it, and had a closer look. 1. Using pdfimages -list to investigate the embedded images If you run a recent (!) version of the Poppler variant of pdfimages, you'll have the -list parameter available. This parameter prints a useful list ...


1

Assuming you use Bash, put the same thing in both ~/.bashrc and ~/.bash_profile. That's what I had to do, at least. Assuming you're using fink, and by all indications of how you've set everything up, it looks like you do.


1

You are missing the right font information. Your Fontmap.GS file state that /TimesNewRoman is an alias for /TimesNewRomanPSMT. But the latter is not available in the same file. Since you have the ttf files in a directory, you only need to update the fontmap.GS adding these lines: /TimesNewRomanPSMT ...


1

As you can see at this post: https://bugs.launchpad.net/ubuntu/+source/cups/+bug/270046/comments/28 SOLVED by the easiest way (Disabling cups apparmor profile) Run these commands ... sudo mv /etc/apparmor.d/usr.sbin.cupsd /etc/apparmor.d/disable sudo /etc/init.d/apparmor restart


1

I recently became involved in a legal matter, for which I wrote a PDF "Bates-stamping" script, pdfBatesStamp.sh. usage excerpt # "Bates-stamp" a PDF file with text (only; images aren't supported). Uses # ghostscript (ps2pdf) and pdftk. # # The output (Bates-stamped) file is put in the same directory, with "_BATES" # appended to its name, thusly: # ...


1

In case anyone else comes across this: I found this link more helpful. It lists different versions, and then you can download a convenient *.tar.gz to unpack / install. I did wget on the URL for the link ghostscript-9.10.tar.gz. For some reason it saved to a file called download, but it is a .tar.gz. So I unpacked with tar -zxvf download cd into the new ...


1

It turned out that you can easily download a binary from the repository, unpack it on the file-system and then just update the PATH variable. After that the application works fine.


1

try this way: gs -dEPSCrop -c "<</Orientation 1>> setpagedevice" -f input.eps -c quit P.S this code snippet come from this post in the rhinocerus forum.



Only top voted, non community-wiki answers of a minimum length are eligible