Scenario: I am generating pdf using FPDI from php , where I use a template pdf to fill the form (its static not Fillable) ,I place text in required positions to give the feeling of its filled by user. which is working great except size it little extra than expected and pdf are viewable without any error or issues
New Requirement: Now I need to
- merge these files into single file
- create a bookmark to each report generated in first step (create TOC)
- possibility reset the page numbers
Obviously I need an open source tool , I don't find any opensource lib/tool( php /java/commandline ), so I installed MacTex package for pdflatex and realted tool
Whenever I include the pdf generated from php I get the errors below . My question to this great community is how I can fix this issue and what are the chances of merging the pdf files generated from php and add TOC
I have borrowed the tex file from SE by @captaincomic
Tex
\documentclass[8pt]{article}
\usepackage[final]{pdfpages}
\usepackage{fancyhdr}
\topmargin 70pt
\oddsidemargin 150pt
\pagestyle{fancy}
\rfoot{\Large\thepage}
\cfoot{}
\renewcommand {\headrulewidth}{0pt}
\renewcommand {\footrulewidth}{0pt}
\begin{document}
\includepdfset{pagecommand=\thispagestyle{fancy}}
\includepdf[pages=-]{include_file.pdf}
\end{document}
> pdflatex number.tex
Output Error
....
<include_file.pdf, id=3, page=1, 614.295pt x 794.97pt>
<use include_file.pdf, page 1> <use include_file.pdf, page 1>
<use include_file.pdf, page 1> <use include_file.pdf, page 1>
<use include_file.pdf, page 1> [1{/usr/local/texlive/2011/texmf-var/fonts/map/p
dftex/updmap/pdftex.map} <./include_file.pdfError (2874915): Bad 'Length' attribute in stream
!pdfTeX error: pdflatex (file ./include_file.pdf): PDF inclusion: type <error>
cannot be copied
==> Fatal error occurred, no output PDF file produced!
xpdf) which does the pdf inclusion. I assume the pdf to be included is really broken. Have you tried to open/process it with another tool? Maybe you could make the file available for inspection? – Stephan Lehmke May 19 '12 at 8:26Error: /typecheck in --run-- Operand stack: --dict:5/14(L)-- F2 14.12 --dict:5/5(L)-- --dict:5/5(L)-- DejaVuSans-Bold-UCS. This seems to be embeded font issue. As I am using DejaVu fonts . – sakhunzai May 21 '12 at 12:08