<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
p.MsoAutoSig, li.MsoAutoSig, div.MsoAutoSig
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
span.EmailStyle18
{mso-style-type:personal;
font-family:Arial;
color:windowtext;}
span.EmailStyle19
{mso-style-type:personal;
font-family:Arial;
color:navy;}
span.EmailStyle20
{mso-style-type:personal;
font-family:Arial;
color:navy;}
span.EmailStyle21
{mso-style-type:personal;
font-family:Arial;
color:navy;}
span.EmailStyle22
{mso-style-type:personal-reply;
font-family:Arial;
color:navy;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="Section1">
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">Hi</span></font><b><span lang="EN" style="font-weight:bold">,<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><font size="3" face="Times New Roman"><span lang="EN" style="font-size:12.0pt;font-weight:bold"><o:p> </o:p></span></font></b></p>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span lang="EN" style="font-size:12.0pt">Actually I am working on an application in which I need to display the headings (or say Intermediate nodes ) of a PDF for a given no. of page.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span lang="EN" style="font-size:12.0pt">For this I am using PDFViewer 0.6 and Poppler but I am having difficulty in how to access the only headings of a given page of PDF, so that I can directly go
to this,<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span lang="EN" style="font-size:12.0pt">So please help me to solve this as if you can give an example of a scenario which is similar to my problem.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span lang="EN" style="font-size:10.0pt;font-family:Arial;color:navy"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span lang="EN" style="font-size:10.0pt;font-family:Arial;color:navy">My code for searching a string is given below:<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span lang="EN" style="font-size:10.0pt;font-family:Arial;color:navy"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span lang="EN" style="font-size:10.0pt;font-family:Arial;color:navy">void PdfView::search(const QString &text, const FindFlags &flags)<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span lang="EN" style="font-size:10.0pt;font-family:Arial;color:navy">{
<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span lang="EN" style="font-size:10.0pt;font-family:Arial;color:navy"> int page = 0,j = 0,k = 0;<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span lang="EN" style="font-size:10.0pt;font-family:Arial;color:navy">
<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span lang="EN" style="font-size:10.0pt;font-family:Arial;color:navy"> const Poppler::Page::SearchDirection searchDirection = (flags & FindBackward) ? Poppler::Page::PreviousResult : Poppler::Page::NextResult;<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span lang="EN" style="font-size:10.0pt;font-family:Arial;color:navy"> const Poppler::Page::SearchMode searchMode = (flags & FindCaseSensitively) ? Poppler::Page::CaseSensitive : Poppler::Page::CaseInsensitive;<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span lang="EN" style="font-size:10.0pt;font-family:Arial;color:navy"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span lang="EN" style="font-size:10.0pt;font-family:Arial;color:navy"> int page_count = d->m_popplerPages.count();<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span lang="EN" style="font-size:10.0pt;font-family:Arial;color:navy"> while(page < document()->numPages() - 1)<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span lang="EN" style="font-size:10.0pt;font-family:Arial;color:navy"> {
<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span lang="EN" style="font-size:10.0pt;font-family:Arial;color:navy"> while(d->m_popplerPages.at(page)->search(text, d->m_findPositionLeft, d->m_findPositionTop, d->m_findPositionRight,
d->m_findPositionBottom, searchDirection, searchMode))<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span lang="EN" style="font-size:10.0pt;font-family:Arial;color:navy"> {
<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span lang="EN" style="font-size:10.0pt;font-family:Arial;color:navy"> if(k == 0)<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span lang="EN" style="font-size:10.0pt;font-family:Arial;color:navy"> {<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span lang="EN" style="font-size:10.0pt;font-family:Arial;color:navy"> k++;<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span lang="EN" style="font-size:10.0pt;font-family:Arial;color:navy"> page_no << page;<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span lang="EN" style="font-size:10.0pt;font-family:Arial;color:navy"> j++;<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span lang="EN" style="font-size:10.0pt;font-family:Arial;color:navy"> }<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span lang="EN" style="font-size:10.0pt;font-family:Arial;color:navy"> }<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span lang="EN" style="font-size:10.0pt;font-family:Arial;color:navy"> page++;<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span lang="EN" style="font-size:10.0pt;font-family:Arial;color:navy"> k = 0;<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span lang="EN" style="font-size:10.0pt;font-family:Arial;color:navy"> d->m_findPositionTop = d->m_findPositionBottom = -1;<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span lang="EN" style="font-size:10.0pt;font-family:Arial;color:navy"> d->m_findPositionLeft = d->m_findPositionRight = -1;<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span lang="EN" style="font-size:10.0pt;font-family:Arial;color:navy"> }<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span lang="EN" style="font-size:10.0pt;font-family:Arial;color:navy">}<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="3" color="navy" face="Times New Roman"><span lang="EN" style="font-size:12.0pt;color:navy"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span lang="EN" style="font-size:10.0pt;
font-family:Arial">Now using these page numbers I got for my text I want to get the headings or topics names for these pages only.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span lang="EN" style="font-size:10.0pt;
font-family:Arial">So, please guide me if poppler is having functionality of getting handle to Topic or heading names of PDF Document.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span lang="EN" style="font-size:10.0pt;
font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span lang="EN" style="font-size:12.0pt">Please help me as soon as possible, I shall be highly grateful to you.</span></font><font size="2" face="Arial"><span style="font-size:
10.0pt;font-family:Arial"><o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoAutoSig"><font size="1" face="Arial"><span style="font-size:9.0pt;
font-family:Arial">Thanks and Regards,<o:p></o:p></span></font></p>
<p class="MsoAutoSig"><b><font size="1" face="Arial"><span style="font-size:9.0pt;
font-family:Arial;font-weight:bold">Nirmit Kansal<o:p></o:p></span></font></b></p>
<p class="MsoAutoSig"><b><font size="1" face="Arial"><span style="font-size:9.0pt;
font-family:Arial;font-weight:bold">Software Engineer<o:p></o:p></span></font></b></p>
<p class="MsoAutoSig"><b><font size="1" face="Arial"><span style="font-size:9.0pt;
font-family:Arial;font-weight:bold"><img width="120" height="44" id="_x0000_i1025" src="cid:image001.jpg@01CDD2FC.42CBB390"><o:p></o:p></span></font></b></p>
<p class="MsoAutoSig"><font size="1" face="Arial"><span style="font-size:9.0pt;
font-family:Arial">.........................................<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt"><o:p> </o:p></span></font></p>
</div>
<br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Disclaimer~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>Information contained and transmitted by this e-mail is confidential and proprietary to iGATE and its affiliates and is intended for use only by the recipient. If you are not the intended recipient, you are hereby notified that any dissemination, distribution, copying or use of this e-mail is strictly prohibited and you are requested to delete this e-mail immediately and notify the originator or <A href="mailto:mailadmin@igate.com">mailadmin@igate.com</A>. iGATE does not enter into any agreement with any party by e-mail. Any views expressed by an individual do not necessarily reflect the view of iGATE. iGATE is not responsible for the consequences of any actions taken on the basis of information provided, through this email. The contents of an attachment to this e-mail may contain software viruses, which could damage your own computer system. While iGATE has taken every reasonable precaution to minimise this risk, we cannot accept liability for any damage which you sustain as a result of software viruses. You should carry out your own virus checks before opening an attachment. To know more about iGATE please visit <A href="http://www.igate.com">www.igate.com</A>.<br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</body>
</html>