Showing posts with label pdf. Show all posts
Showing posts with label pdf. Show all posts

Monday, March 29, 2010

Linux: how to reduce eps file size?

I have couples of eps files which have a large size (>10 MB). Thus when using them in Latex, the output files (either pdf or ps) become very large and very slow to view. So it is necessary to reduce them first. Here provided is an approch working in Linux.

  1. Create a new open office drawing file, past your large eps file to the canvas.
  2. Add your canvas hence it has no too much extra-space (magine)
  3. Export your drawing file to a PDF file. Here you can use low compress factors etc.
  4. Use "pdftops -eps YourFile.pdf" to get your small-size eps file
Note: You can use open office drawing to export your file to an eps file directly, however, the eps file is even larger than your original one, so this exporting is not useful.

Friday, August 14, 2009

linux: how to insert an img to pdf files

If you want to insert an image (like your picture, signature etc.) to an existing pdf file and you don't have acrobat professional version (that allows you to edit a pdf file within the software). Then you may be able to use the following steps with combination of different tools that are available in linux:

  1. You have an image file (say, one lovely picture) and one pdf file (Orig.pdf) to which you want to insert your picture
  2. Use "gimp" to open them. For the pdf file, you have to select which page that you want to insert your picture to, and then open the page (NOTE: in order to have good quality and same size as the original page, you may have to set "resolution" as 320. I tried 300 and 400, and realized that 320 is the proper value)
  3. In "gimp", copy your picture on the pdf page. You can use the menu "Layer -> Scale Layer ..." to scale your picture to fit your requirement.
  4. Save your modified pdf page as one "eps" file.
  5. In terminal, convert the eps file to a pdf file by "epstopdf MyPage.eps" to get MyPage.pdf
  6. Then, still in your terminal, use the tool "pdftk" to merge the 2 pdf files (Orig.pdf and MyPage.pdf):
pdftk A=Orig.pdf B=MyPage.pdf cat A1-4 B1 A6-11 output Combined.pdf
where we assume MyPage.pdf will be inserted as Page 5 while totoal pages in Orig.pdf are 11 pages.

Merge pdf files:

pdftk 1.pdf 2.pdf 3.pdf cat output 123.pdf

Thursday, August 13, 2009

linux:command:pdf: a useful tool

In linux, there is a very useful PDF tool called pdftk

http://www.accesspdf.com/pdftk/

Tuesday, September 16, 2008

linux:tools: how to edit pdf files

To the Linux Users who need to edit pdf files or figures:
In Linux, you may use pdfedit or xfig etc to edit pdf files, however, they are not good enough. For example, pdfedit is too slow to make users mad ( I am one of victims :-( ). However, you could use an online tool here:

http://www.pdfescape.com

to edit your pdf files. Fast, easy to use...

Tuesday, August 19, 2008

Latex: change row color of table

An example here:

\usepackage[table]{xcolor}
(if you use pdflatex and/or beamer, perhaps you need to transit 'table' by
\documentclass[xcolor=table..]{beamer} or you will have an error like:
! LaTeX Error: Option clash for package xcolor.
)

\begin{table}
\centering
\rowcolors{2}{gray!10}{}\tiny
\begin{tabular}{c||cc|cc}\hline\hline
....
\end{tabular}
\caption{...}
\end{table}

Thursday, March 27, 2008

linux: open pdf within a browser window AND how to browse e-books from NetLibrary

Lots of interesting e-books from our SFU library are based on the site of www.netlibrary.com . The readers have to go to the online lib. However, the NetLib didn't provide Linux users about their reader softerware (only for windows users). I notice that essentially when one reads an e-book online, it is a pdf file downloaded (only one page each time). No need special reader at all! However, my browser cannot open pdf file within a browser window so that I have to click a diagostic window to save it or read it by certain pdf software. If I can read pdf files within the browser, then the life becomes simpler. No need to open the pdf file each time, just read the book in the browser! I tried some approaches by following instructions on the internet. Finally I solve the problem. I think the essential steps are also useful for windows users.

- type : about:plugins in your web address blank line to see if acrobat reader plugins over there. If not, see the next
- try to find the lib file which should be located in the directory where acrobat reader is installed, in my case, it is:

/opt/Adobe/Reader8/Browser/intellinux/nppdf.so . copy it over to the directory where

firefox is installed, in my case,

/home/myusername/.mozilla/plugins/

- check about:plugins again. If not, read the next line.
- re-initialize the data base, remove files pluginreg.dat where your firefox is installed.
- I guess the problem should be solved. I refer to the web page here:

http://support.mozilla.com/en-US/kb/Opening+PDF+files+within+Firefox

Friday, November 30, 2007

linux: how to merge/split pdf files

In linux, there is no professional acrobat avaible, which means that sometimes if you edit your pdf files, for example, merge, split pdf files, you may not have clue to do that. Lots of ppl in the net would recommend "pdftk" (pdf toolket) for you. I try to install, but some lib is needed. I have no time to install other dependent lib so I recalled I have a java tool: Multivalent. Just google it and find its page.

Usage:
java -classpath ~/Multivalent20060102.jar tool.pdf.Merge file1.pdf file2.pdf ...

That is it. You also can split your pdf file to separated ones. Of course, you need to download Multivalent20060102.jar from somewhere of the net. Yes, you can use "convert" to merge, but bad resolution and very slow, not recommended.

Thursday, June 21, 2007

Linux:software: How to merge multiple pdf files into one

Use the command in Linux to merge some PDF files into one:

gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=firstANDsecond.pdf -dBATCH first.pdf second.pdf

Use it, you have two packages installed in your system

Link: Ghostscript download
Link: PDFtk download

For more information, see the reference link: http://www.newlinuxuser.com/merge-multiple-pdfs-into-one-file/

Locations of visitors to this page