After split pdf file, use Rasterfarian.
What you need.
acrobat(not reader) type pdf editing tool.
pdflatex(I will use it when I split it)
rasterfarian
1. pdf file crop
Using acrobat, just crop as much as you can.
2. Using pdflatex, compile split.tex
(Of course, you should change some setting in tex file when you use a different pdf file)
split.tex
----------------------
\documentclass{article}
\unitlength=1pt
\def\startp{1}
\def\endp{23}%%% endpage+1 \def\overlaprate{0.01} % decimal overlap
\def\errfactor{1.002}
\def\fname{sample.pdf} %% input file name.
\newlength{\paperx}
\setlength{\paperx}{332pt}
\newlength{\papery}
\setlength{\papery}{256pt}%
\newlength{\fontsi}
\setlength{\fontsi}{15pt}
\newlength{\pagex}
\newlength{\pagey}
\newlength{\cuty}
\newlength{\scale}
\newlength{\resultovery}
\newlength{\resulty}
%\newlength{\ytopfactor}
%\setlength{\ytopfactor}{0pt}
\makeatletter
\newcommand*{\px}{\strip@pt\paperx}
\newcommand*{\py}{\strip@pt\papery}
\newcommand*{\pgx}{\strip@pt\pagex}
\newcommand*{\pgy}{\strip@pt\pagey}
\newcommand*{\cy}{\strip@pt\cuty}
\newcommand*{\sca}{\strip@pt\scale}
\newcommand*{\ry}{\strip@pt\resulty}
\newcommand*{\roy}{\strip@pt\resultovery}
\newcommand{\npt}[1]{\strip@pt#1}
\makeatother
\usepackage[paperwidth=\paperx,paperheight=\papery,margin={0pt ,0pt},pdftex,nohead,nofoot]{geometry}
\usepackage{ifthen,pdfpages,calc,hyperref}
\usepackage{amsmath,amssymb}
\pagestyle{empty}
\newcounter{pg}
\setcounter{pg}{\startp}
\begin{document}
\setbox1=\hbox{
\expandafter\includegraphics[page=\thepg]{\fname}
}
\setlength{\pagex}{\the\wd1}
\setlength{\pagey}{\the\ht1}
\setlength{\scale}{\paperx *\real{\errfactor}/ \real{\pgx}}
\setlength{\cuty}{\pagey *\real{\sca}-\papery}
\setlength{\resulty}{\cuty / \real{\sca}}
\setlength{\resultovery}{\resulty + \pagey*\real{\overlaprate}}
\includegraphics[scale=\sca,viewport={{0} {\ry} {\pgx} {\pgy}},page=\thepg]{\fname}
\whiledo{\value{pg}<\endp}{
\setbox1=\hbox{
\expandafter\includegraphics[page=\thepg]{\fname}
}
\setlength{\pagex}{\the\wd1}
\setlength{\pagey}{\the\ht1}
\setlength{\scale}{\paperx *\real{\errfactor}/ \real{\pgx}}
\setlength{\cuty}{\pagey *\real{\sca}-\papery}
\setlength{\resulty}{\cuty / \real{\sca}}
\setlength{\resultovery}{\resulty + \pagey*\real{\overlaprate}}
\includegraphics[scale=\sca,viewport={{0} {\ry} {\pgx} {\pgy}},page=\thepg]{\fname}
\expandafter
\includegraphics[scale=\sca,viewport={{0} {0} {\pgx} {\roy}},page=\thepg]{\fname}
%\hyperlink{page:toc}{TOC}
\addtocounter{pg}{1}
}
\end{document}
----------------------
3. Now re-edit split.pdf file
Delete page 1,2.
( I am sorry that I can not fix these problems.)
!! Important fact. You should rotate pdf file in anti-clockwise way.
4. Use Rasterfarian.
(no auto crop,whole page setting)
I guess you will get a little more clear lrf file.
Thanks.
PS. How can I add TOC(table of contents)?
Last edited by harpum; 07-14-2007 at 01:29 AM.
Reason: file
|