my page was basically a big table and I didn't have the luxury of entering a section name. However, I wanted the section name to appear in pdf bookmark.
\documentclass[12pt]{article}
\usepackage{url}
\usepackage[pdftex]{hyperref} %% comes last
\hypersetup{
pdftitle={},
pdfauthor={},
bookmarks=true, bookmarksopen=true, pdftoolbar=true,
pdffitwindow=false,
colorlinks=false,
linkcolor=red,
citecolor=red,
filecolor=magenta,
urlcolor=black }
\usepackage{bookmark}
\begin{document}
\newpage%
% LOCATION A
\begin{table}[htb] \centering
% LOCATION B
Possible solution 1:
\newcommand\invisiblesection[1]{%
\refstepcounter{section}%
\addcontentsline{toc}{section}{\protect\numberline{\thesection}#1}%
\sectionmark{#1}}
enter chapter title here
\invisiblesection{text you want to appear in pdf file}
Possible solution 2:
\pdfbookmark[1]{title}{comment}
My mistake:
I tried each of these solutions in Location A.
Consequence:
strangly the pdf file bookmark was linked to a very different page.
Solution:
Try them at Location B
\documentclassand the appropriate packages that sets up the problem. While solving problems is fun, setting them up is not. Then those trying to help can simply cut and paste your MWE and get started on solving problem. – Peter Grill Nov 05 '12 at 05:47