You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Sabrina Kowarsch <sa...@rwth-aachen.de> on 2013/06/06 18:31:45 UTC

Extract Chapters and Pages


Hello!

Is it possible to extract the titles of chapters and subchapters of an PDF  
and list how much pages they have each?

Regards,
Sabrina

Re: Extract Chapters and Pages

Posted by Maruan Sahyoun <sa...@fileaffairs.de>.
you can take a look at http://pdfbox.apache.org/apidocs/org/apache/pdfbox/examples/pdmodel/PrintBookmarks.html as a start.

BR
Maruan Sahyoun

Am 06.06.2013 um 20:00 schrieb Sabrina Kowarsch <sa...@rwth-aachen.de>:

> Yes
> 
> Am 06.06.2013, 19:21 Uhr, schrieb Maruan Sahyoun <sa...@fileaffairs.de>:
> 
>> does it have bookmarks related to chapters and subchapters?
>> 
>> Maruan Sahyoun
>> 
>> Am 06.06.2013 um 19:17 schrieb Sabrina Kowarsch <sa...@rwth-aachen.de>:
>> 
>>> It would be a LaTex Document for Bachelor and Master Thesis.
>>> I don't think I can upload the template to public.
>>> 
>>> Am 06.06.2013, 18:40 Uhr, schrieb Maruan Sahyoun <sa...@fileaffairs.de>:
>>> 
>>>> Hi,
>>>> 
>>>> if the PDF has structure information such as bookmarks being related to these chapters and subchapters than that's possible. If it's only dependent on some text characteristics such as font sizes it might still be possible but a much more difficult task as one needs to get the text, get the text information such as font size …… maybe you have a sample PDF to share on a public site (as the mailing list doesn't allow attachments)
>>>> 
>>>> BR
>>>> Maruan Sahyoun
>>>> 
>>>> Am 06.06.2013 um 18:31 schrieb Sabrina Kowarsch <sa...@rwth-aachen.de>:
>>>> 
>>>>> 
>>>>> 
>>>>> Hello!
>>>>> 
>>>>> Is it possible to extract the titles of chapters and subchapters of an PDF and list how much pages they have each?
>>>>> 
>>>>> Regards,
>>>>> Sabrina


Re: Extract Chapters and Pages

Posted by Sabrina Kowarsch <sa...@rwth-aachen.de>.
Yes

Am 06.06.2013, 19:21 Uhr, schrieb Maruan Sahyoun <sa...@fileaffairs.de>:

> does it have bookmarks related to chapters and subchapters?
>
> Maruan Sahyoun
>
> Am 06.06.2013 um 19:17 schrieb Sabrina Kowarsch  
> <sa...@rwth-aachen.de>:
>
>> It would be a LaTex Document for Bachelor and Master Thesis.
>> I don't think I can upload the template to public.
>>
>> Am 06.06.2013, 18:40 Uhr, schrieb Maruan Sahyoun  
>> <sa...@fileaffairs.de>:
>>
>>> Hi,
>>>
>>> if the PDF has structure information such as bookmarks being related  
>>> to these chapters and subchapters than that's possible. If it's only  
>>> dependent on some text characteristics such as font sizes it might  
>>> still be possible but a much more difficult task as one needs to get  
>>> the text, get the text information such as font size …… maybe you have  
>>> a sample PDF to share on a public site (as the mailing list doesn't  
>>> allow attachments)
>>>
>>> BR
>>> Maruan Sahyoun
>>>
>>> Am 06.06.2013 um 18:31 schrieb Sabrina Kowarsch  
>>> <sa...@rwth-aachen.de>:
>>>
>>>>
>>>>
>>>> Hello!
>>>>
>>>> Is it possible to extract the titles of chapters and subchapters of  
>>>> an PDF and list how much pages they have each?
>>>>
>>>> Regards,
>>>> Sabrina

Re: Extract Chapters and Pages

Posted by Maruan Sahyoun <sa...@fileaffairs.de>.
does it have bookmarks related to chapters and subchapters?

Maruan Sahyoun

Am 06.06.2013 um 19:17 schrieb Sabrina Kowarsch <sa...@rwth-aachen.de>:

> It would be a LaTex Document for Bachelor and Master Thesis.
> I don't think I can upload the template to public.
> 
> Am 06.06.2013, 18:40 Uhr, schrieb Maruan Sahyoun <sa...@fileaffairs.de>:
> 
>> Hi,
>> 
>> if the PDF has structure information such as bookmarks being related to these chapters and subchapters than that's possible. If it's only dependent on some text characteristics such as font sizes it might still be possible but a much more difficult task as one needs to get the text, get the text information such as font size …… maybe you have a sample PDF to share on a public site (as the mailing list doesn't allow attachments)
>> 
>> BR
>> Maruan Sahyoun
>> 
>> Am 06.06.2013 um 18:31 schrieb Sabrina Kowarsch <sa...@rwth-aachen.de>:
>> 
>>> 
>>> 
>>> Hello!
>>> 
>>> Is it possible to extract the titles of chapters and subchapters of an PDF and list how much pages they have each?
>>> 
>>> Regards,
>>> Sabrina


Re: Extract Chapters and Pages

Posted by Sabrina Kowarsch <sa...@rwth-aachen.de>.
So there will be this /Section and /Subsection in the LaTex files and I'm  
also allowed to modify the template.
However, it consists of arbitrary many subfiles. So I thought it would be  
easier to just look it up in the PDF -  also for the pages.

Am 06.06.2013, 19:17 Uhr, schrieb Sabrina Kowarsch  
<sa...@rwth-aachen.de>:

> It would be a LaTex Document for Bachelor and Master Thesis.
> I don't think I can upload the template to public.
>
> Am 06.06.2013, 18:40 Uhr, schrieb Maruan Sahyoun  
> <sa...@fileaffairs.de>:
>
>> Hi,
>>
>> if the PDF has structure information such as bookmarks being related to  
>> these chapters and subchapters than that's possible. If it's only  
>> dependent on some text characteristics such as font sizes it might  
>> still be possible but a much more difficult task as one needs to get  
>> the text, get the text information such as font size …… maybe you have  
>> a sample PDF to share on a public site (as the mailing list doesn't  
>> allow attachments)
>>
>> BR
>> Maruan Sahyoun
>>
>> Am 06.06.2013 um 18:31 schrieb Sabrina Kowarsch  
>> <sa...@rwth-aachen.de>:
>>
>>>
>>>
>>> Hello!
>>>
>>> Is it possible to extract the titles of chapters and subchapters of an  
>>> PDF and list how much pages they have each?
>>>
>>> Regards,
>>> Sabrina

Re: Extract Chapters and Pages

Posted by Sabrina Kowarsch <sa...@rwth-aachen.de>.
It would be a LaTex Document for Bachelor and Master Thesis.
I don't think I can upload the template to public.

Am 06.06.2013, 18:40 Uhr, schrieb Maruan Sahyoun <sa...@fileaffairs.de>:

> Hi,
>
> if the PDF has structure information such as bookmarks being related to  
> these chapters and subchapters than that's possible. If it's only  
> dependent on some text characteristics such as font sizes it might still  
> be possible but a much more difficult task as one needs to get the text,  
> get the text information such as font size …… maybe you have a sample  
> PDF to share on a public site (as the mailing list doesn't allow  
> attachments)
>
> BR
> Maruan Sahyoun
>
> Am 06.06.2013 um 18:31 schrieb Sabrina Kowarsch  
> <sa...@rwth-aachen.de>:
>
>>
>>
>> Hello!
>>
>> Is it possible to extract the titles of chapters and subchapters of an  
>> PDF and list how much pages they have each?
>>
>> Regards,
>> Sabrina

Re: Extract Chapters and Pages

Posted by Maruan Sahyoun <sa...@fileaffairs.de>.
Hi,

if the PDF has structure information such as bookmarks being related to these chapters and subchapters than that's possible. If it's only dependent on some text characteristics such as font sizes it might still be possible but a much more difficult task as one needs to get the text, get the text information such as font size …… maybe you have a sample PDF to share on a public site (as the mailing list doesn't allow attachments)

BR
Maruan Sahyoun

Am 06.06.2013 um 18:31 schrieb Sabrina Kowarsch <sa...@rwth-aachen.de>:

> 
> 
> Hello!
> 
> Is it possible to extract the titles of chapters and subchapters of an PDF and list how much pages they have each?
> 
> Regards,
> Sabrina