[Tex/LaTex] Adobe reader tells me error when opening the PDF


I'm transfering Master thesis from Word to LaTex (and I'm not expert in this). I have to use template, which we have from school. I pasted it here on pastebin.com.

What was my problem: When I create PDF with this template, it works fine somewhere. But Adobe reader had some problems.

I'm using TexWorks (I installed it with MikTex) and pdfLatex to create pdf. I see everything fine in TexWorks viewer. Also Google Chrome displayes everything OK. But when I open it in Adobe Reader X, title page is blank and when I scroll to first real page (with chapter 1), it tells me, that there is problem on page (content, list of tables and list of images are fine).

What I have found: When I comment stuff around insertOutline, it's better (it displayes more text), but there is still no title page and I still get the message from Adobe.

Doesn't anybody of you have any idea what could be the problem?


According to comments, I have found, that problem was in outline and hyperlinks (I have updated pastebin code). First blank page was blank because of this line: \usepackage[table]{xcolor}.

But I dont't understant code about outline and hyperlinks. Could someone please tell me, what it means, so I can try to fix it by other way than in my template?

%% external hyperlinks
  \bgroup \catcode`\ =9 \catcode`\~=12 \catcode`\_=12 \catcode`\@=12




%% internal hyperlinks



%% initialize outlines
  \@inspdf{\special{pdf:outline #1 
      << /Title (#2) /Dest [ @thispage /FitH @ypos ] >>}}}


%% insert outlines manually

I have also modified my latex code, which uses this style:

%%% Deklarace hlavičky dokumentu, použijte písmo velikosti 12 bodů.


%%% Moje package navic

\title{Název diplomové práce}
\author{Nějaký Pán}
\date{13. březen 2012}

\docinfo{Nejakjy Pan}{Nazev diplomove prace}

%%% Vytvoření anotace. Pouze jeden odstavec!

%%% Nepovinný text poděkování. Pouze jeden odstavec!
Poděkování vedoucímu práce, rodině apod. (nepovinné)}


%%% Vytvoření úvodních stránek, obsahu a seznamu tabulek a obrázků.

% 1. chapter

\section{Programátorská dokumentace}

Již na začátku diplomové práce bylo přesně definováno, jaký druh aplikace má vzniknout. Mělo se jednat o webovou aplikaci a dle toho také byl zvolen přístup k vývoji, jak už z pohledu použitých programovacích jazyků, tak z~pohledu návrhu architektury aplikace. Při vývoji byly respektovány zažité normy a idiomy.


It's no more giving me error (I have commented that stuff about hyperlinks and outlines), but Adobe reader still doesn't display title page.

If you want to try it, please create some small image named uplogo and put it to latex code folder.

Best Answer

I understand your pain, but the template you are using has a lot of \special commands dealing with PDF. A special command in TeX is one that writes straight into the output file (i.e., they are PDF commands rather than TeX commands). The problem lies here, and is difficult to solve without knowing the version of the pdf used when the template was written.

It is highly unlikely it will get fixed without you having to modify or patch the template. A better approach is not to use any commands that require specials. You may be able to get the same effect with just adding the package hyperref. I would work slowly from a working minimal and add items until an error occurs.