Results 1 to 6 of 6

Thread: pdf document to bmp image

  1. #1
    Join Date
    Apr 2011
    Location
    Hyderabad
    Posts
    86
    Thanks
    17
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default pdf document to bmp image

    Hi,

    I have to convert pdf document(small document of 1 page) to bmp image in my Qt Application on Linux.

    can you guide me...... how to do that ?

    Is it possible to convert pdf document in bmp images ?

    thanks in advance

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: pdf document to bmp image

    Is it possible to convert pdf document in bmp images ?
    Not with Qt itself. You can convert a PDF document to a QImage using Poppler-Qt4. Once you have a QImage, you can save that to whatever format QImage supports.

    Poppler-Qt4 is just a Qt wrapper for poppler itself, which you will also have to download and build. I think poppler is only available on linux platforms.

  3. #3
    Join Date
    Apr 2011
    Location
    Hyderabad
    Posts
    86
    Thanks
    17
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: pdf document to bmp image

    hi d_stranz

    first of all thanks to you.

    i am already trying with Poppler-Qt4, and i have already installed Poppler-Qt4.

    But i am not able to convert PDF document in QImage. If it is possible then my work is over.
    can you provide me any link for this or demo source for converting pdf to QImage.

  4. #4
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: pdf document to bmp image

    But i am not able to convert PDF document in QImage. If it is possible then my work is over.
    can you provide me any link for this or demo source for converting pdf to QImage.
    Did you actually look at this page? It contains all the code you need to open a PDF document, go to a specific page, then render that page to a QImage using Poppler-Qt4.

    If you want to render a multi-page document to a single QImage, then you need to divide your QImage up into page-sized rectangles, set the x, y and call renderToImage() for each page.
    Last edited by d_stranz; 15th March 2013 at 19:32.

  5. #5

    Default Re: pdf document to bmp image

    Hi, Sanjeet.
    I wonder have you ever worked it out? Do I need another 3rd party manual toolkit? When it comes to PDF converting process, I have another question, I wonder have you ever tried to
    convert pdf to other image files before? As for myself, I am testing the related PDF to PNG converting, PDF to BMP converting , and PDF to JPG converting programs these days. Do you have experience about it? Any suggestion will be appreciated. Thanks in advance.



    Best regards,
    Peter

  6. #6
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: pdf document to bmp image

    All the tools you need are mentioned in this thread already. Once you have a QImage you can save it in a range of formats.

Similar Threads

  1. what`s this special document?
    By tuli in forum Qt Programming
    Replies: 2
    Last Post: 17th December 2012, 14:45
  2. document collaboration
    By shaan in forum Qt-based Software
    Replies: 1
    Last Post: 15th November 2010, 05:31
  3. Help document
    By weixj2003ld in forum Qt Programming
    Replies: 5
    Last Post: 17th May 2009, 12:04
  4. open a document
    By peace_comp in forum Qt Programming
    Replies: 5
    Last Post: 30th June 2008, 07:08

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.