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. Plugins for PDF to be installed for Qt
Forum Updated to NodeBB v4.3 + New Features

Plugins for PDF to be installed for Qt

Scheduled Pinned Locked Moved Unsolved General and Desktop
21 Posts 3 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.
  • Christian EhrlicherC Offline
    Christian EhrlicherC Offline
    Christian Ehrlicher
    Lifetime Qt Champion
    wrote on last edited by
    #4

    @harsha123 said in Plugins for PDF to be installed for Qt:

    Like when i run the code to create PDF it is creating error that is because of not having plugins.

    But Qt does not create PDFs. You just call an ActiveX object in another program which then creates a PDF. So you must make sure that this program is able to create PDFs. Has nothing to do with Qt.

    Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
    Visit the Qt Academy at https://academy.qt.io/catalog

    1 Reply Last reply
    4
    • H harsha123

      Sorry, it is QAxObject not QAxWidget, i think some plugins are missing to create a PDF file in Qt thats y i am asking this...
      Like when i run the code to create PDF it is creating error that is because of not having plugins.

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by JonB
      #5

      @harsha123 said in Plugins for PDF to be installed for Qt:

      Like when i run the code to create PDF it is creating error that is because of not having plugins.

      And what "error" is this showing you?

      Maybe this error is coming from the Word itself you access via QAx... saying it needs something set up in order to convert to PDF, I don't know? In your other threads on this I did ask you to verify you can do the export to PDF from within Word yourself, before you try to do it from Qt QAx...: did you test that?

      1 Reply Last reply
      1
      • H Offline
        H Offline
        harsha123
        wrote on last edited by
        #6

        when i run in one system it is working , but in other system i ma getting this error

        QAxBase::dynamicCallHelper: ExportAsFixedFormat(QVariant,QVariant,QVariant): No such property in [Microsoft Word Document]
        Candidates are:
        Email
        EmbedLinguisticData
        EmbedSmartTags
        EmbedTrueTypeFonts
        Endnotes
        EnforceStyle
        Envelope

        Donno the reason behind this.

        JonBJ 2 Replies Last reply
        0
        • H harsha123

          when i run in one system it is working , but in other system i ma getting this error

          QAxBase::dynamicCallHelper: ExportAsFixedFormat(QVariant,QVariant,QVariant): No such property in [Microsoft Word Document]
          Candidates are:
          Email
          EmbedLinguisticData
          EmbedSmartTags
          EmbedTrueTypeFonts
          Endnotes
          EnforceStyle
          Envelope

          Donno the reason behind this.

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by JonB
          #7

          @harsha123 said in Plugins for PDF to be installed for Qt:

          when i run in one system it is working , but in other system i ma getting this error

          You never said before it is working on one system but not on another, that is new (important) information......

          One more time: on the "other, non-working" system, have you or have you not tested you can do the PDF export from Word outside of Qt? And, did you try the similar export-to-PDF but from Excel instead on that system?

          1 Reply Last reply
          0
          • H Offline
            H Offline
            harsha123
            wrote on last edited by
            #8

            yesterday after knowing the plugin issue i tried with different system then the same code is working, but in the old system it is not working, Reason is not know trying to find out the solution.

            1 Reply Last reply
            0
            • Christian EhrlicherC Offline
              Christian EhrlicherC Offline
              Christian Ehrlicher
              Lifetime Qt Champion
              wrote on last edited by
              #9

              This is for sure not Qt problem since ExportAsFixedFormat is an ActiveX call in Excel and therefore the error message comes from there, not Qt.

              Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
              Visit the Qt Academy at https://academy.qt.io/catalog

              JonBJ 1 Reply Last reply
              0
              • Christian EhrlicherC Christian Ehrlicher

                This is for sure not Qt problem since ExportAsFixedFormat is an ActiveX call in Excel and therefore the error message comes from there, not Qt.

                JonBJ Offline
                JonBJ Offline
                JonB
                wrote on last edited by
                #10

                @Christian-Ehrlicher
                The actual error appears to be that QAxBase::dynamicCallHelper() is not finding ExportAsFixedFormat as an "exported Automation method" in the installed Word on some particular machine. Why I do not yet know, I'd like to know whether the similar Excel call does or does not work.....

                1 Reply Last reply
                0
                • H Offline
                  H Offline
                  harsha123
                  wrote on last edited by
                  #11

                  no with excel call also it is not working this issue is with only one system.

                  1 Reply Last reply
                  0
                  • H harsha123

                    when i run in one system it is working , but in other system i ma getting this error

                    QAxBase::dynamicCallHelper: ExportAsFixedFormat(QVariant,QVariant,QVariant): No such property in [Microsoft Word Document]
                    Candidates are:
                    Email
                    EmbedLinguisticData
                    EmbedSmartTags
                    EmbedTrueTypeFonts
                    Endnotes
                    EnforceStyle
                    Envelope

                    Donno the reason behind this.

                    JonBJ Offline
                    JonBJ Offline
                    JonB
                    wrote on last edited by
                    #12

                    @harsha123 said in Plugins for PDF to be installed for Qt:

                    QAxBase::dynamicCallHelper: ExportAsFixedFormat(QVariant,QVariant,QVariant): No such property in [Microsoft Word Document]
                    Candidates are:
                    Email
                    EmbedLinguisticData
                    EmbedSmartTags
                    EmbedTrueTypeFonts

                    OK, I've had a quick look at this. If you Google e.g. Word EmbedTrueTypeFonts you come to https://docs.microsoft.com/en-us/office/vba/api/word.document.embedtruetypefonts. If you look through the index on the left that is indeed a property. But ExportAsFixedFormat is a method, at https://docs.microsoft.com/en-us/office/vba/api/word.document.exportasfixedformat. I am unsure whether the error message referring to a "property" has or has not looked for it as a method. You might try with another method from there, such as Save() or Repaginate(), to see whether those do work as "methods"?

                    1 Reply Last reply
                    0
                    • H Offline
                      H Offline
                      harsha123
                      wrote on last edited by
                      #13

                      when i use save file getting created but when try to open the file it is showing some thing went wrong ,i didnt work on Repaginate i will try that once..

                      JonBJ 1 Reply Last reply
                      0
                      • H harsha123

                        when i use save file getting created but when try to open the file it is showing some thing went wrong ,i didnt work on Repaginate i will try that once..

                        JonBJ Offline
                        JonBJ Offline
                        JonB
                        wrote on last edited by
                        #14

                        @harsha123
                        One thing: are the versions of Word the same on both machines? Same version of Word, and not one has Microsoft/Office 365 installed locally while the other uses it only from the web?

                        1 Reply Last reply
                        0
                        • H Offline
                          H Offline
                          harsha123
                          wrote on last edited by
                          #15

                          Yeah in both systems word versions are different in one system (non working) it is 2003 and in other system it is 2019.

                          JonBJ 1 Reply Last reply
                          0
                          • Christian EhrlicherC Offline
                            Christian EhrlicherC Offline
                            Christian Ehrlicher
                            Lifetime Qt Champion
                            wrote on last edited by
                            #16

                            So did you actually tried to save a doc in Word 2003 as PDF? Did it work? I would guess not because saving to PDF was added later...

                            Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                            Visit the Qt Academy at https://academy.qt.io/catalog

                            1 Reply Last reply
                            0
                            • H harsha123

                              Yeah in both systems word versions are different in one system (non working) it is 2003 and in other system it is 2019.

                              JonBJ Offline
                              JonBJ Offline
                              JonB
                              wrote on last edited by JonB
                              #17

                              @harsha123
                              Ahhhhhhhhhhhhhhhhhhhhhhhhhh. It really helps if you check and state this in the first place!

                              https://stackoverflow.com/questions/60342174/word-exportasfixedformat claims to have it working in Word 2019. It might be worth a try passing all the same number of parameters as you see in that example code, in case 2019 ExportAsFixedFormat requires more parameters than before, i don't know.

                              P.S.
                              Only the first 2 parameters are mandatory. Try ExportAsFixedFormat(QVariant,QVariant) or whatever it is you presently have but omit the third parameter for "OpenAfterExport", just in case that works instead (though I don't think so, but worth a try).

                              1 Reply Last reply
                              0
                              • H Offline
                                H Offline
                                harsha123
                                wrote on last edited by
                                #18

                                Ok u mean in working system i need to install 2003 version and check once, because with 2019 it is working

                                JonBJ 1 Reply Last reply
                                0
                                • H harsha123

                                  Ok u mean in working system i need to install 2003 version and check once, because with 2019 it is working

                                  JonBJ Offline
                                  JonBJ Offline
                                  JonB
                                  wrote on last edited by JonB
                                  #19

                                  @harsha123 said in Plugins for PDF to be installed for Qt:

                                  because with 2019 it is working

                                  Do you mean NOT working??

                                  WAIT

                                  one system (non working) it is 2003

                                  OMG. Word 2003 is too old to have ExportAsFixedFormat, no wonder!! (And probably does not export to PDF at all; I did ask you to verify that it worked on the failing system just from within Word, forget about Qt?) Why not say that from the outset? Who in the world uses Word 2003 in 2022...? This is your whole issue...... Please supply such relevant information in the first place when you ask a question, this whole thing has been a wild goose chase.....

                                  1 Reply Last reply
                                  2
                                  • H Offline
                                    H Offline
                                    harsha123
                                    wrote on last edited by
                                    #20

                                    yes not working with 2003,ok i thought the reason i because of QT

                                    JonBJ 1 Reply Last reply
                                    0
                                    • H harsha123

                                      yes not working with 2003,ok i thought the reason i because of QT

                                      JonBJ Offline
                                      JonBJ Offline
                                      JonB
                                      wrote on last edited by
                                      #21

                                      @harsha123
                                      That's why you needed to check the non-working system's PDF export from within Word before you tried to access it from Qt :)

                                      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