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. Qt proj and PDFCreator from Amyuni

Qt proj and PDFCreator from Amyuni

Scheduled Pinned Locked Moved Unsolved General and Desktop
9 Posts 3 Posters 2.8k 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.
  • T Offline
    T Offline
    Tony123
    wrote on last edited by
    #1

    Hi guys,
    First of all I want to know you I am beginer with Qt proj.
    So I need to implement Amyuni PDF library to existing Qt proj.
    So in documentation they say I can use Amyuni PDFCreator as library
    without using their PDFCreator control which is an activeX control.
    So here in documentation they said that:
    https://www.amyuni.com/WebHelp/Developer_Documentation.htm#Amyuni_PDF_Creator_for_ACTIVE_X/About/Legal_Information.htm

    (BTW I using C++ and MS Visual Studio 2013)
    My questions are:

    1. How can I import their dll elegantly without using #import "/pathToTheDLl"
      to my Qt project.
    2. Why they generate that 2 additional dlls. Do I need them at all?
      2.5 Importing their dll means that I actually using their library ?

    THANK YOU ALL IN ADVANCE

    jsulmJ 1 Reply Last reply
    0
    • T Tony123

      Hi guys,
      First of all I want to know you I am beginer with Qt proj.
      So I need to implement Amyuni PDF library to existing Qt proj.
      So in documentation they say I can use Amyuni PDFCreator as library
      without using their PDFCreator control which is an activeX control.
      So here in documentation they said that:
      https://www.amyuni.com/WebHelp/Developer_Documentation.htm#Amyuni_PDF_Creator_for_ACTIVE_X/About/Legal_Information.htm

      (BTW I using C++ and MS Visual Studio 2013)
      My questions are:

      1. How can I import their dll elegantly without using #import "/pathToTheDLl"
        to my Qt project.
      2. Why they generate that 2 additional dlls. Do I need them at all?
        2.5 Importing their dll means that I actually using their library ?

      THANK YOU ALL IN ADVANCE

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Tony123 You should start with http://doc.qt.io/qt-5/third-party-libraries.html

      What is "#import "/pathToTheDLl""? Do you mean #include <...>?
      Sure you need to include header files which you need to use.
      I don't know whether you need both DLLs, that you need to check or ask them.

      "Importing their dll means that I actually using their library" - no, it only means that your app will depend on those DLLs. To use them you need to use the functionality provided by those DLLs (call their functions, use their classes,...).

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • T Offline
        T Offline
        Tony123
        wrote on last edited by
        #3

        Thank you for your quick answer @jsulm .
        #import is a way to import your dll with hardcode, thats why I ask if I can set the dll somewhere in Qt proj.
        Only thing I have is a dll file. I have no headers or lib files. Thats why I am confused.

        jsulmJ 1 Reply Last reply
        0
        • T Tony123

          Thank you for your quick answer @jsulm .
          #import is a way to import your dll with hardcode, thats why I ask if I can set the dll somewhere in Qt proj.
          Only thing I have is a dll file. I have no headers or lib files. Thats why I am confused.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by jsulm
          #4

          @Tony123 It actually looks like .Net and UWP library not C++: https://www.amyuni.com/de/developer/pdfcreator/features/
          You could try to use the UWP version of that library. For that you need to install UWP Qt 5.9 version (currently beta).
          Also: it looks like it is commercial and costs money! https://www.amyuni.com/en/developer/pdfcreatoruwp/pricing/
          Cost per Developer License
          $ 529 USD

          Cost per Application License
          $ 799 USD

          Maintenance
          $ 519 USD

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          1
          • T Offline
            T Offline
            Tony123
            wrote on last edited by Tony123
            #5

            @jsulm It can be used in C++ enviroment if you download this product PDFCreator for ActiveX. See documentation:

            https://www.amyuni.com/WebHelp/Developer_Documentation.htm#Amyuni_PDF_Creator_for_ACTIVE_X/About/Legal_Information.htm

            . On left side navigate to Overview-> Inserting PDFCreator Control into a Project-> Using a PDFCreator in a C++ Project

            Money doesnt matter here. Just make it work.

            jsulmJ VRoninV 2 Replies Last reply
            0
            • T Tony123

              @jsulm It can be used in C++ enviroment if you download this product PDFCreator for ActiveX. See documentation:

              https://www.amyuni.com/WebHelp/Developer_Documentation.htm#Amyuni_PDF_Creator_for_ACTIVE_X/About/Legal_Information.htm

              . On left side navigate to Overview-> Inserting PDFCreator Control into a Project-> Using a PDFCreator in a C++ Project

              Money doesnt matter here. Just make it work.

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @Tony123 Well I'm not an expert with all that proprietary Microsoft stuff (like #import - this isn't part of C++ standard).
              So, I cannot help here. Maybe somebody else can.

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • T Tony123

                @jsulm It can be used in C++ enviroment if you download this product PDFCreator for ActiveX. See documentation:

                https://www.amyuni.com/WebHelp/Developer_Documentation.htm#Amyuni_PDF_Creator_for_ACTIVE_X/About/Legal_Information.htm

                . On left side navigate to Overview-> Inserting PDFCreator Control into a Project-> Using a PDFCreator in a C++ Project

                Money doesnt matter here. Just make it work.

                VRoninV Offline
                VRoninV Offline
                VRonin
                wrote on last edited by VRonin
                #7

                @Tony123 said:

                So in documentation they say I can use Amyuni PDFCreator as library without using their PDFCreator control which is an activeX control.

                On left side navigate to Overview-> Inserting PDFCreator Control into a Project-> Using a PDFCreator in a C++ Project

                It does not. The first comment in the documentation you linked reads Register the ActiveX COM control

                You can use it as a .Net library using C++/CLI. To enable it in a qmake project add the following lines to your .pro file:

                QMAKE_CXXFLAGS += -clr
                QMAKE_CXXFLAGS_STL_ON -= -EHsc
                QMAKE_CXXFLAGS_EXCEPTIONS_ON -= -EHsc
                

                for CMake see http://stackoverflow.com/questions/40126734/set-clr-support-to-true-with-cmake
                Note that the above will apply to all source files in your project. You need Visual Studio to make it apply to a single source file only.

                After that you can use the #import syntax as well as any other C++/CLI keywords and follow the example in On left side navigate to Overview-> Inserting PDFCreator Control into a Project->Using PDF Creator as a DLL in .Net -> C++

                Sometimes there are some compatibility issue between Qt and CLR. at the moment a known bug is in QStateMachine

                "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
                ~Napoleon Bonaparte

                On a crusade to banish setIndexWidget() from the holy land of Qt

                1 Reply Last reply
                3
                • T Offline
                  T Offline
                  Tony123
                  wrote on last edited by Tony123
                  #8

                  @VRonin Ok, You just confused me more and more :).
                  I dont know what is Qmake or Cmake or how can these help me.
                  I am already able to #import that dll and make it work with activeX control in my Qt project. I mean I just create a Qt proj added this line and also added QAxWidget:

                  // imported that dll
                  #import "C:\Program Files\Amyuni PDF Suite\PDFCreactiveX.dll" no_namespace /*raw_interfaces_only*/
                  
                   IPDFCreactiveXPtr pdf;
                   
                  //Create the PDFCreactiveX instance
                   pdf.CreateInstance(__uuidof(PDFCreactiveX));
                  
                  pdf. DO_STUFFS
                  
                  

                  boom here we go!
                  But my question are:

                  1. Is there any, more elegant way to import that file.? Like in Project properties or I dont know?
                  2. I'm just curious if I do it right. Because my only task is in existing Qt project use the Amyuni PDF
                    library instead of QuckPDF library.

                  Thanks dont over complicate it pls. Maybe if you sent me a sample it would be more efficient if I missing something.

                  Big thanks !!

                  VRoninV 1 Reply Last reply
                  0
                  • T Tony123

                    @VRonin Ok, You just confused me more and more :).
                    I dont know what is Qmake or Cmake or how can these help me.
                    I am already able to #import that dll and make it work with activeX control in my Qt project. I mean I just create a Qt proj added this line and also added QAxWidget:

                    // imported that dll
                    #import "C:\Program Files\Amyuni PDF Suite\PDFCreactiveX.dll" no_namespace /*raw_interfaces_only*/
                    
                     IPDFCreactiveXPtr pdf;
                     
                    //Create the PDFCreactiveX instance
                     pdf.CreateInstance(__uuidof(PDFCreactiveX));
                    
                    pdf. DO_STUFFS
                    
                    

                    boom here we go!
                    But my question are:

                    1. Is there any, more elegant way to import that file.? Like in Project properties or I dont know?
                    2. I'm just curious if I do it right. Because my only task is in existing Qt project use the Amyuni PDF
                      library instead of QuckPDF library.

                    Thanks dont over complicate it pls. Maybe if you sent me a sample it would be more efficient if I missing something.

                    Big thanks !!

                    VRoninV Offline
                    VRoninV Offline
                    VRonin
                    wrote on last edited by
                    #9

                    @Tony123 said in Qt proj and PDFCreator from Amyuni:

                    Is there any, more elegant way to import that file.? Like in Project properties or I dont know?

                    in visual studio, right click on the project -> properties -> Common Properties -> References -> add new reference -> browse

                    You still need the #import "PDFCreactiveX.dll" on top though

                    I'm just curious if I do it right. Because my only task is in existing Qt project use the Amyuni PDF library instead of QuckPDF library.

                    Quickly looking at that documentation I'd say this is the way to go. Up to you to decide if linking to .Net is acceptable for your project

                    "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
                    ~Napoleon Bonaparte

                    On a crusade to banish setIndexWidget() from the holy land of Qt

                    1 Reply Last reply
                    1

                    • Login

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