Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Display PDF file in Qt app
QtWS25 Last Chance

Display PDF file in Qt app

Scheduled Pinned Locked Moved General and Desktop
6 Posts 4 Posters 2.4k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • MassiM Offline
    MassiM Offline
    Massi
    wrote on last edited by
    #1

    Dear Qt forum,

    Is it possible to display pdf file within my Qt GUI? I have tried with poppler according to link text but I never succeed to build it. I got many errors like: LNK1104: cannot open file ‘..\Debug\poppler.lib’

    I would appreciate your help!

    Cheers,

    Massi

    Software Design Engineer at Ford - Canada

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Where's you poppler lib located ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      MassiM 1 Reply Last reply
      0
      • sneubertS Offline
        sneubertS Offline
        sneubert
        wrote on last edited by
        #3

        Hi Massi

        wihtout poppler lib you can´t link to poppler. On windows it´s an exhausting task to get all dependencies to compile poppler. I have a set of working release and debug builds for poppler-qt5 created with msvc2013. You can get them if this setup suits you.

        MassiM 1 Reply Last reply
        0
        • SGaistS SGaist

          Hi,

          Where's you poppler lib located ?

          MassiM Offline
          MassiM Offline
          Massi
          wrote on last edited by
          #4

          @SGaist Thank you for your reply! I started by building poppler link text using CMake with vs2008 + Qt4 under win7 64x with linking all the dependencies (freetype, zlib, openjpeg, cairo). After building the solution in vs2008, I got the following errors (There is no poppler-qt4.lib at all in my folders):

          • Error 252 fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64' QtCored4.lib poppler-qt4
            Error 253 fatal error LNK1104: cannot open file '..\src\Debug\poppler-qt4.lib' stress-poppler-qt4 stress-poppler-qt4
            Error 254 fatal error LNK1104: cannot open file '..\src\Debug\poppler-qt4.lib' poppler_attachments poppler_attachments
            Error 255 fatal error LNK1104: cannot open file '..\src\Debug\poppler-qt4.lib' stress-poppler-dir stress-poppler-dir
            Error 256 fatal error LNK1104: cannot open file '..\src\Debug\poppler-qt4.lib' test-poppler-qt4 test-poppler-qt4
            Error 257 fatal error LNK1104: cannot open file '..\src\Debug\poppler-qt4.lib' poppler-texts poppler-texts
            Error 259 fatal error LNK1104: cannot open file '..\src\Debug\poppler-qt4.lib' poppler-forms poppler-forms
            Error 264 fatal error LNK1104: cannot open file '..\src\Debug\poppler-qt4.lib' stress-threads-qt4 stress-threads-qt4
            Error 265 fatal error LNK1104: cannot open file '..\src\Debug\poppler-qt4.lib' test-password-qt4 test-password-qt4
            Error 266 fatal error LNK1104: cannot open file '..\src\Debug\poppler-qt4.lib' poppler-fonts poppler-fonts
            Error 286 fatal error LNK1104: cannot open file '..\src\Debug\poppler-qt4.lib' check_search check_search
            Error 287 fatal error LNK1104: cannot open file '..\src\Debug\poppler-qt4.lib' check_permissions check_permissions
            Error 288 fatal error LNK1104: cannot open file '..\src\Debug\poppler-qt4.lib' check_password check_password
            Error 289 fatal error LNK1104: cannot open file '..\src\Debug\poppler-qt4.lib' check_pagemode check_pagemode
            Error 290 fatal error LNK1104: cannot open file '..\src\Debug\poppler-qt4.lib' check_pagelayout check_pagelayout
            Error 291 fatal error LNK1104: cannot open file '..\src\Debug\poppler-qt4.lib' check_pagelabelinfo check_pagelabelinfo
            Error 293 fatal error LNK1104: cannot open file '..\src\Debug\poppler-qt4.lib' check_optcontent check_optcontent
            Error 294 fatal error LNK1104: cannot open file '..\src\Debug\poppler-qt4.lib' check_metadata check_metadata
            Error 295 fatal error LNK1104: cannot open file '..\src\Debug\poppler-qt4.lib' check_links check_links
            Error 296 fatal error LNK1104: cannot open file '..\src\Debug\poppler-qt4.lib' check_goostring check_goostring
            Error 297 fatal error LNK1104: cannot open file '..\src\Debug\poppler-qt4.lib' check_lexer check_lexer
            Error 300 fatal error LNK1104: cannot open file '..\src\Debug\poppler-qt4.lib' check_fonts check_fonts
            Error 301 fatal error LNK1104: cannot open file '..\src\Debug\poppler-qt4.lib' check_dateConversion check_dateConversion
            Error 302 fatal error LNK1104: cannot open file '..\src\Debug\poppler-qt4.lib' check_attachments check_attachments
            Error 303 fatal error LNK1104: cannot open file '..\src\Debug\poppler-qt4.lib' check_actualtext check_actualtext
            Error 304 fatal error LNK1104: cannot open file '..\src\Debug\poppler-qt4.lib' test-render-to-file test-render-to-file
            Error 305 fatal error LNK1104: cannot open file '..\src\Debug\poppler-qt4.lib' poppler_qt4viewer poppler_qt4viewer
            Error 202 fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory c:\Users\massinissa.bandou\Downloads\poppler-0.35.0.tar\poppler-0.35.0\poppler-0.35.0\poppler\CairoRescaleBox.cc 48 pdftocairo
            Error 207 fatal error C1083: Cannot open include file: 'fontconfig/fontconfig.h': No such file or directory C:\Users\massinissa.bandou\Downloads\cairo\include\cairo\cairo-ft.h 50 pdftocairo
            Error 208 fatal error C1083: Cannot open include file: 'fontconfig/fontconfig.h': No such file or directory C:\Users\massinissa.bandou\Downloads\cairo\include\cairo\cairo-ft.h 50 pdftocairo
            Error 227 fatal error C1083: Cannot open include file: 'fontconfig/fontconfig.h': No such file or directory C:\Users\massinissa.bandou\Downloads\cairo\include\cairo\cairo-ft.h 50 pdftocairo

          Software Design Engineer at Ford - Canada

          1 Reply Last reply
          0
          • sneubertS sneubert

            Hi Massi

            wihtout poppler lib you can´t link to poppler. On windows it´s an exhausting task to get all dependencies to compile poppler. I have a set of working release and debug builds for poppler-qt5 created with msvc2013. You can get them if this setup suits you.

            MassiM Offline
            MassiM Offline
            Massi
            wrote on last edited by
            #5

            @sneubert First I really appreciate your help!! Actually I'm using vs2008 + Qt4 under win7 x64. I really don't know how to get the poppler lib. It seems more difficult to build than using it!!

            Software Design Engineer at Ford - Canada

            1 Reply Last reply
            0
            • B Offline
              B Offline
              Brad M
              wrote on last edited by
              #6

              The first error explains the problem. You are doing a 32bit build but you have a 64bit Qt version. You need to build poppler with a 64bit compiler or get a 32bit Qt install. I don't think VS2008 will do 64 bit.

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved