Results 1 to 7 of 7

Thread: Is MuPDF consistent with Qt4 GUI apps?

Threaded View

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

    Default Is MuPDF consistent with Qt4 GUI apps?

    I am trying to create an app which fixes "bad" PDFs: PDFs without ToC (I mean outline tree - create ToC), PDFs with duplicate pages (delete them) or "quickly created" PDFs made by joining several other PDFs (senseless items in ToC, usually names of the PDF parts, senseless pages, etc. - delete all this). Such PDFs often contain useful information but in useless form so fix it.

    I need something for manipulating a PDF (I am trying PoDoFo) and something for displaying a page because PoDoFo cannot render a page image. I already have got a bad experience with poppler-qt - very ugly images, as if they came from middle 90s. So I compiled MuPDF ver. 1.3 and tried it.

    When I created a "non Qt" project in the Creator and let MuPDF render several pages of a test PDF (storing them in files), the result was splendid. When I created a Qt GUI project, the project worked until I started using MuPDF. With MuPDF, all texts vanished from the app and I got bags of error messages:
    Qt Code:
    1. render glyph failed err=13 face=0x29d1eb0, glyph=51
    2. <many similar lines>
    To copy to clipboard, switch view to plain text mode 

    The end. Does anybody know what is it all about? And why poppler-qt produces such ugly images? Many PDF apps use poppler and results aren't ugly. With poppler, I tried this:
    Qt Code:
    1. Poppler::Document *document = Poppler::Document::load(filename); // in fact, not here but in OpenPDF()
    2. Poppler::Page *pdfPage = document->page(pageNumber);
    3. QImage image = pdfPage->renderToImage();
    4.  
    5. <display image in the page window>
    6.  
    7. delete pdfPage;
    8. delete document; // in fact, not here but in ClosePDF()
    To copy to clipboard, switch view to plain text mode 

    What am I doing wrong?

  2. The following user says thank you to Radek for this useful post:


Similar Threads

  1. values' decimal places not consistent
    By babygal in forum Newbie
    Replies: 1
    Last Post: 15th June 2011, 05:25
  2. Applying a consistent background
    By KanadaKid in forum Qt Programming
    Replies: 2
    Last Post: 27th December 2009, 17:56
  3. Replies: 0
    Last Post: 26th June 2009, 17:53
  4. Replies: 1
    Last Post: 15th May 2009, 07:16
  5. Replies: 2
    Last Post: 9th January 2009, 19:49

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
  •  
Qt is a trademark of The Qt Company.