Results 1 to 7 of 7

Thread: Creating bookmarked pdf document

  1. #1
    Join Date
    Apr 2015
    Posts
    1
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11

    Default Creating bookmarked pdf document

    Hi,

    I want to generate a pdf document. I will be using QPrinter to write contents(text and images) to pdf document.
    Is there a way to create bookmark(index) for pdf document so that all bookmarks are displayed in left panel?

    Thanks

  2. #2
    Join Date
    Apr 2013
    Location
    Prague
    Posts
    258
    Thanks
    3
    Thanked 65 Times in 59 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Creating bookmarked pdf document

    AFAIK, no. Poppler is "read-only" as well as MuPdf (they cannot manipulate the pdf, only read). PoDoFo should be able to create ToC but, IMO, ToC is buggy in PoDoFo so that the app will fail most likely - you can try because you'll create the ToC from scratch instead of manipulating ToC. My experience is that manipulating fails because of bad linking of ToC in PoDoFo. Humuus is "write-only" (it can only create the pdf from scratch). AFAIK, Qt cannot create ToC.

    Well, the only chance is VirtualBox, get winblows somehow (don't ask how), get Acrobat somehow (don't ask how) and make the ToC in Acrobat.

  3. #3
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Creating bookmarked pdf document

    Quote Originally Posted by Radek View Post
    Well, the only chance is VirtualBox, get winblows somehow (don't ask how), get Acrobat somehow (don't ask how) and make the ToC in Acrobat.
    I would be surprised if there aren't some libraries that can create PDFs with metadata.
    After all pdflatex is a tool that can do that so it is imlpementable ouside of Adobe.

    Cheers,
    _

  4. #4
    Join Date
    Apr 2013
    Location
    Prague
    Posts
    258
    Thanks
    3
    Thanked 65 Times in 59 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Creating bookmarked pdf document

    pdflatex needs a .tex source, not a .pdf. As to the libraries, it seems to be a sad reality. Once upon a time, I wanted to write a utility able of a few basic fixups of .pdf's. Namely, creating or fixing ToC and removing pages. I searched for a library able of fixing ToC (for starters, removing pages was planned later). The whining above is a result of my searching. Now, I am using VirtualBox with XP (no network) and Acrobat in trial mode.

  5. #5
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Creating bookmarked pdf document

    Quote Originally Posted by Radek View Post
    pdflatex needs a .tex source, not a .pdf.
    Well, obviously.
    It it still a non-Adobe product capable of generating PDFs with all kinds of features, including ToC, interactive links, etc.

    So there is no technical reason why a library for PDF creation couldn't offer the same capabilities.

    Quote Originally Posted by Radek View Post
    As to the libraries, it seems to be a sad reality.
    There are tons of PDF libraries, I would be surprised of none of them had the necessary features.
    easyPDF for example can do bookmarks.

    Quote Originally Posted by Radek View Post
    Once upon a time, I wanted to write a utility able of a few basic fixups of .pdf's. Namely, creating or fixing ToC and removing pages.
    pdfjam can do quite a lot

    Cheers,
    _

  6. #6
    Join Date
    Apr 2013
    Location
    Prague
    Posts
    258
    Thanks
    3
    Thanked 65 Times in 59 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Creating bookmarked pdf document

    I am speaking about a C or C++ API able of manipulating PDF files. The source file is a .pdf, the target file is a .pdf, too. There aren't tons of libraries of this kind. easyPDF is a converter, pdfjam can rotate and flip pages, make 2-column PDF and similar things.

  7. #7
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Creating bookmarked pdf document

    Quote Originally Posted by Radek View Post
    easyPDF is a converter
    I was obviously refering to the easyPDF library/SDK.

    Quote Originally Posted by Radek View Post
    pdfjam can rotate and flip pages, make 2-column PDF and similar things.
    And remove pages, one of the things you mentioned earlier.

    Cheers,
    _

Similar Threads

  1. pdf document to bmp image
    By sanjeet in forum Qt Programming
    Replies: 5
    Last Post: 26th September 2015, 21:31
  2. Document generation
    By tomas.soltys in forum Qt Programming
    Replies: 1
    Last Post: 25th February 2014, 04:26
  3. Append to a XML Document
    By Goldmmbr in forum Qt Programming
    Replies: 0
    Last Post: 16th November 2009, 15:03
  4. Help document
    By weixj2003ld in forum Qt Programming
    Replies: 5
    Last Post: 17th May 2009, 12:04

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.