Trusted Software Excellence across Desktop and Embedded
Take a glance at the areas of expertise where KDAB excels ranging from swift troubleshooting, ongoing consulting and training to multi-year, large-scale software development projects.
Find out why customers from innovative industries rely on our extensive expertise, including Medical, Biotech, Science, Renewable Energy, Transportation, Mobility, Aviation, Automation, Electronics, Agriculture and Defense.
High-quality Embedded Engineering across the Stack
To successfully develop an embedded device that meets your expectations regarding quality, budget and time to market, all parts of the project need to fit perfectly together.
Learn more about KDAB's expertise in embedded software development.
Where the capabilities of modern mobile devices or web browsers fall short, KDAB engineers help you expertly architect and build high-functioning desktop and workstation applications.
Extensible, Safety-compliant Software for the Medical Sector
Create intelligent, patient-focused medical software and devices and stay ahead with technology that adapts to your needs.
KDAB offers you expertise in developing a broad spectrum of clinical and home-healthcare devices, including but not limited to, internal imaging systems, robotic surgery devices, ventilators and non-invasive monitoring systems.
Building digital dashboards and cockpits with fluid animations and gesture-controlled touchscreens is a big challenge.
In over two decades of developing intricate UI solutions for cars, trucks, tractors, scooters, ships, airplanes and more, the KDAB team has gained market leading expertise in this realm.
Build on Advanced Expertise when creating Modern UIs
KDAB assists you in the creation of user-friendly interfaces designed specifically for industrial process control, manufacturing, and fabrication.
Our specialties encompass the custom design and development of HMIs, enabling product accessibility from embedded systems, remote desktops, and mobile devices on the move.
Legacy software is a growing but often ignored problem across all industries. KDAB helps you elevate your aging code base to meet the dynamic needs of the future.
Whether you want to migrate from an old to a modern GUI toolkit, update to a more recent version, or modernize your code base, you can rely on over 25 years of modernization experience.
KDAB offers a wide range of services to address your software needs including consulting, development, workshops and training tailored to your requirements.
Our expertise spans cross-platform desktop, embedded and 3D application development, using the proven technologies for the job.
When working with KDAB, the first-ever Qt consultancy, you benefit from a deep understanding of Qt internals, that allows us to provide effective solutions, irrespective of the depth or scale of your Qt project.
Qt Services include developing applications, building runtimes, mixing native and web technologies, solving performance issues, and porting problems.
KDAB helps create commercial, scientific or industrial desktop applications from scratch, or update its code or framework to benefit from modern features.
Discover clean, efficient solutions that precisely meet your requirements.
Boost your team's programming skills with in-depth, constantly updated, hands-on training courses delivered by active software engineers who love to teach and share their knowledge.
Our courses cover Modern C++, Qt/QML, Rust, 3D programming, Debugging, Profiling and more.
The collective expertise of KDAB's engineering team is at your disposal to help you choose the software stack for your project or master domain-specific challenges.
Our particular focus is on software technologies you use for cross-platform applications or for embedded devices.
Since 1999, KDAB has been the largest independent Qt consultancy worldwide and today is a Qt Platinum partner. Our experts can help you with any aspect of software development with Qt and QML.
KDAB specializes in Modern C++ development, with a focus on desktop applications, GUI, embedded software, and operating systems.
Our experts are industry-recognized contributors and trainers, leveraging C++'s power and relevance across these domains to deliver high-quality software solutions.
KDAB can guide you incorporating Rust into your project, from as overlapping element to your existing C++ codebase to a complete replacement of your legacy code.
Unique Expertise for Desktop and Embedded Platforms
Whether you are using Linux, Windows, MacOS, Android, iOS or real-time OS, KDAB helps you create performance optimized applications on your preferred platform.
If you are planning to create projects with Slint, a lightweight alternative to standard GUI frameworks especially on low-end hardware, you can rely on the expertise of KDAB being one of the earliest adopters and official service partner of Slint.
KDAB has deep expertise in embedded systems, which coupled with Flutter proficiency, allows us to provide comprehensive support throughout the software development lifecycle.
Our engineers are constantly contributing to the Flutter ecosystem, for example by developing flutter-pi, one of the most used embedders.
KDAB invests significant time in exploring new software technologies to maintain its position as software authority. Benefit from this research and incorporate it eventually into your own project.
Start here to browse infos on the KDAB website(s) and take advantage of useful developer resources like blogs, publications and videos about Qt, C++, Rust, 3D technologies like OpenGL and Vulkan, the KDAB developer tools and more.
The KDAB Youtube channel has become a go-to source for developers looking for high-quality tutorial and information material around software development with Qt/QML, C++, Rust and other technologies.
Click to navigate the all KDAB videos directly on this website.
In over 25 years KDAB has served hundreds of customers from various industries, many of them having become long-term customers who value our unique expertise and dedication.
Learn more about KDAB as a company, understand why we are considered a trusted partner by many and explore project examples in which we have proven to be the right supplier.
The KDAB Group is a globally recognized provider for software consulting, development and training, specializing in embedded devices and complex cross-platform desktop applications.
Read more about the history, the values, the team and the founder of the company.
When working with KDAB you can expect quality software and the desired business outcomes thanks to decades of experience gathered in hundreds of projects of different sizes in various industries.
Have a look at selected examples where KDAB has helped customers to succeed with their projects.
KDAB is committed to developing high-quality and high-performance software, and helping other developers deliver to the same high standards.
We create software with pride to improve your engineering and your business, making your products more resilient and maintainable with better performance.
KDAB has been the first certified Qt consulting and software development company in the world, and continues to deliver quality processes that meet or exceed the highest expectations.
In KDAB we value practical software development experience and skills higher than academic degrees. We strive to ensure equal treatment of all our employees regardless of age, ethnicity, gender, sexual orientation, nationality.
Interested? Read more about working at KDAB and how to apply for a job in software engineering or business administration.
Some months ago Shawn Rutledge blogged about the new QtPdf module, a Qt wrapper around the PDFium library, which allows you to render PDF documents to QImages. Since that blog post we have invested some more work into the module to make it more useful in your day-to-day projects.
One long-standing bug report against Qt is QTBUG-28886, which is about adding a widget to Qt that can easily render a PDF document. That does not only involve rendering of single pages, but also to provide ways to navigate through the document, so say hello to...
QPdfView
QPdfView is a widget that renders a PDF document that has been loaded through QPdfDocument. It offers a single page and a continuous multi page mode and the user can choose between fit-to-width, fit-in-view or a custom zoom level.
To avoid the UI getting blocked while the PDF document is rendered, the rendering of the single pages is off-loaded to a worker thread.
Getting the code
To test the new features, just clone the QtPdf repository, install it and compile the examples like this:
If you want to see a more extensive example, have a look at the examples/pdf/pdfviewer directory in the QtPdf module.
Next steps
At the moment the PDFium version which is shipped with QtPdf is rather outdated, and therefore does not include the latest security fixes from upstream. The blocking factor from upgrading it is PDFium's build system, which has changed from gyp to gn; the build system integration inside QtPdf hasn't followed up yet.
Thankfully, Michal Klocek from The Qt Company provided the first patches that allow us to implement a proper integration between qmake and gn, so that compiling the QtPdf module with an up-to-date PDFium version should be much easier in the future.
On the UI side there are many things to do as well, here just a short selection from the top of my head:
extend navigation possibilities (e.g. follow links, navigate to sections)
add custom QtQuick item to render PDF pages (patches in progress already)
extend and improve documentation.
Nonetheless, I hope this module will be useful to the many users who are looking for an easy solution to render PDF documents in their Qt applications!
View our 'Widgets and more' video series
Yes, widgets are still alive and kicking. In the many years we have worked with them, we have gathered quite a number of tips and tricks that we’d love to share with you.
About KDAB
Trusted software excellence across embedded and desktop platforms
The KDAB Group is a globally recognized provider for software consulting, development and training, specializing in embedded devices and complex cross-platform desktop applications. In addition to being leading experts in Qt, C++ and 3D technologies for over two decades, KDAB provides deep expertise across the stack, including Linux, Rust and modern UI frameworks. With 100+ employees from 20 countries and offices in Sweden, Germany, USA, France and UK, we serve clients around the world.
Great news! Thanks Tobias (and everyone who worked on this).
3 - May - 2018
piomiq
Just tip for someone who met issue (error during building) like below:
../3rdparty/pdfium/third_party/freetype/src/base/ftbase.c:19:10: fatal error: ft2build.h: No such file or directory
#include
This happens only when you use python3. If your main python is python2 you should be able to build QtPdf.
For all who use python3 workaround is making link to python2 (just temporary relink /usr/bin/python to python2).
Sad is that, I reported this issue over one year ago (January 2017) and nobody fixed this yet :(.
Check: http://blog.qt.io/blog/2017/01/30/new-qtpdf-qtlabs-module/
4 - May - 2018
Tobias Koenig
Hej Peter,
thank you very much for the hint, I haven't seen your comment on Shawns blog post, so I missed the fact that the current build system does not work with Python 3. Anyway, since the next step will be to update the build system to use gn (to be compatible with upstream PDFium), this Python script will be replaced and therefore the problem hopefully be solved soon.
9 - Jun - 2024
Eduardo
A little bit late, but for those who are trying to build using python3,
Modify qtpdf/src/3rdparty/gyp2pri.py:121 to
for key, value in variables.items():
then you can build pdf and pdfwidget usin python3
Now I run make install, but qmake does not recognize module pdf.
¿What am I doing wrong?
3 - May - 2018
piomiq
Isn't better just to use this library "poppler" (exists poppler-qt5 which is Qt5 bindings) instead of build qtpdf?
4 - May - 2018
Tobias Koenig
Hej Peter,
the Poppler library is distributed under the GPL license, so it cannot (easily) be used in proprietary projects.
Furthermore the PDFium library is actively maintained by Google (since it is used by Chromium to render PDFs) and for graphic intensive documents it renders the pages much faster than Poppler.
3 - May - 2018
Thaodan
Whats wrong about popler or whats the advantage here?
4 - May - 2018
Tobias Koenig
Please see my response to Peter's question
15 - May - 2018
Will
Is there any possibility of something like a QPDFGraphicsItem that could be used in a QGraphicsView rather than requiring a dedicated view widget for just this type of object? Or does the underlying PDF library make it impractical to provide that kind of deeper Qt integration beyond a widget to view what the library spits out?
16 - May - 2018
Tobias Koenig
Hej Will,
the QPdfDocument class allows you to render a specific page (or part of a page) into a QImage, so it shouldn't be too difficult to reimplement a QGraphicsItem subclass which utilizes this function to display parts of a PDF document. However, at the moment the QtPdf module doesn't provide a convenience class for it, but upstream contributions are always welcome :)
23 - May - 2018
Martin Koller
On openSuse I get the following errors:
cd lib/ && ( test -e Makefile || /usr/bin/qmake-qt5 -o Makefile /home/PACKAGES/qt/5.9.2/src/qtpdf/src/lib/lib.pro ) && make -f Makefile
Traceback (most recent call last):
File "/home/PACKAGES/qt/5.9.2/src/qtpdf/src/3rdparty/gyp2pri.py", line 162, in
gyp = Gyp(config.input, variables)
File "/home/PACKAGES/qt/5.9.2/src/qtpdf/src/3rdparty/gyp2pri.py", line 7, in __init__
with open(fileName, "r") as f:
IOError: [Errno 2] No such file or directory: '/home/PACKAGES/qt/5.9.2/src/qtpdf/src/3rdparty/pdfium/pdfium.gyp'
Traceback (most recent call last):
File "/home/PACKAGES/qt/5.9.2/src/qtpdf/src/3rdparty/gyp2pri.py", line 162, in
gyp = Gyp(config.input, variables)
File "/home/PACKAGES/qt/5.9.2/src/qtpdf/src/3rdparty/gyp2pri.py", line 7, in __init__
with open(fileName, "r") as f:
IOError: [Errno 2] No such file or directory: '/home/PACKAGES/qt/5.9.2/src/qtpdf/src/3rdparty/pdfium/third_party/third_party.gyp'
Cannot read /home/PACKAGES/qt/5.9.2/src/qtpdf/src/lib/pdfium.pri: No such file or directory
Cannot read /home/PACKAGES/qt/5.9.2/src/qtpdf/src/lib/freetype.pri: No such file or directory
and later also
jsbridge.cpp:37:50: fatal error: fpdfsdk/javascript/JS_Runtime_Stub.cpp: No such file or directory
23 - May - 2018
Tobias Koenig
Hej Martin,
have you initialized the submodules correctly (e.g. called 'git submodule update --init --recursive')? Looks like your 'qtpdf/src/3rdparty/pdfium/' directory is empty, which indicates that the pdfium submodule has not been cloned.
24 - May - 2018
Martin Koller
Stupid me ... Sorry for the noise. I overlooked this step.
24 - May - 2018
Martin Koller
Sorry for the noise, I have overlooked this step.
Works now. Thanks.
23 - May - 2018
JohnL
Thanks Tobias, It's been a long time since my original request of having a PDF viewer (QTBUG-28886) and I am glad to see it starting to happen. As soon as the new build system is in place, I plan on dedicating time on adding form editing to your QtPDF module wrapper to take advantage of these features in PDFium.
15 - Jun - 2018
Robert
Can you also use QPdfDocument to create a PDF by code and save it? QPdfWriter unfortunately has one severe restriction - no bookmarks and links.
15 - Jun - 2018
Tobias Koenig
Hej Robert,
QPdfDocument only provides API do render PDF documents, but not to assemble them.
Links are 'kind of' supported by QPdfWriter, the QPdfEngine class has a member drawHyperlink(QRect, QUrl), so when you use a QPainter that draws on a QPrinter in PDF output mode and include the private header qpdf_p.h, you could do dynamic_cast<QPdfEngine*>(painter.paintEngine())->drawHyperlink(...). So it is private API which can be accessed on your own risk. ;)
18 - Jun - 2018
Robert
That's too bad. Thanks for the hint, though!
28 - Sept - 2021
Korbi
Hi, QPdfView is great and easy to implement.
I quick got an lightweight pdf viewer.
I also implemented a search toolbox to search the pdf for an specific text string.
But now I want to highlight the text where I found the string. Is there a method to highlight some text?
29 - Sept - 2021
Tobias Koenig
Hej,
unfortunately there is no public API available yet to highlight the text.
29 - Sept - 2021
Korbi
Is it possible to highlight text in a QPdfView?
Tobias Koenig
Senior Software Engineer
Senior software engineer at KDAB, Tobias has actively developed with Qt since 2001 and has been an active KDE contributor during this time. His contributions have been mainly to the KDE PIM project and the KDE libraries, but also to other open source projects. He holds an MSc in Computer Science.
21 Comments
2 - May - 2018
Andy
Great news! Thanks Tobias (and everyone who worked on this).
3 - May - 2018
piomiq
Just tip for someone who met issue (error during building) like below: ../3rdparty/pdfium/third_party/freetype/src/base/ftbase.c:19:10: fatal error: ft2build.h: No such file or directory #include
This happens only when you use python3. If your main python is python2 you should be able to build QtPdf. For all who use python3 workaround is making link to python2 (just temporary relink /usr/bin/python to python2). Sad is that, I reported this issue over one year ago (January 2017) and nobody fixed this yet :(. Check: http://blog.qt.io/blog/2017/01/30/new-qtpdf-qtlabs-module/
4 - May - 2018
Tobias Koenig
Hej Peter,
thank you very much for the hint, I haven't seen your comment on Shawns blog post, so I missed the fact that the current build system does not work with Python 3. Anyway, since the next step will be to update the build system to use gn (to be compatible with upstream PDFium), this Python script will be replaced and therefore the problem hopefully be solved soon.
9 - Jun - 2024
Eduardo
A little bit late, but for those who are trying to build using python3, Modify qtpdf/src/3rdparty/gyp2pri.py:121 to for key, value in variables.items(): then you can build pdf and pdfwidget usin python3 Now I run make install, but qmake does not recognize module pdf. ¿What am I doing wrong?
3 - May - 2018
piomiq
Isn't better just to use this library "poppler" (exists poppler-qt5 which is Qt5 bindings) instead of build qtpdf?
4 - May - 2018
Tobias Koenig
Hej Peter,
the Poppler library is distributed under the GPL license, so it cannot (easily) be used in proprietary projects. Furthermore the PDFium library is actively maintained by Google (since it is used by Chromium to render PDFs) and for graphic intensive documents it renders the pages much faster than Poppler.
3 - May - 2018
Thaodan
Whats wrong about popler or whats the advantage here?
4 - May - 2018
Tobias Koenig
Please see my response to Peter's question
15 - May - 2018
Will
Is there any possibility of something like a QPDFGraphicsItem that could be used in a QGraphicsView rather than requiring a dedicated view widget for just this type of object? Or does the underlying PDF library make it impractical to provide that kind of deeper Qt integration beyond a widget to view what the library spits out?
16 - May - 2018
Tobias Koenig
Hej Will, the QPdfDocument class allows you to render a specific page (or part of a page) into a QImage, so it shouldn't be too difficult to reimplement a QGraphicsItem subclass which utilizes this function to display parts of a PDF document. However, at the moment the QtPdf module doesn't provide a convenience class for it, but upstream contributions are always welcome :)
23 - May - 2018
Martin Koller
On openSuse I get the following errors:
23 - May - 2018
Tobias Koenig
Hej Martin, have you initialized the submodules correctly (e.g. called 'git submodule update --init --recursive')? Looks like your 'qtpdf/src/3rdparty/pdfium/' directory is empty, which indicates that the pdfium submodule has not been cloned.
24 - May - 2018
Martin Koller
Stupid me ... Sorry for the noise. I overlooked this step.
24 - May - 2018
Martin Koller
Sorry for the noise, I have overlooked this step. Works now. Thanks.
23 - May - 2018
JohnL
Thanks Tobias, It's been a long time since my original request of having a PDF viewer (QTBUG-28886) and I am glad to see it starting to happen. As soon as the new build system is in place, I plan on dedicating time on adding form editing to your QtPDF module wrapper to take advantage of these features in PDFium.
15 - Jun - 2018
Robert
Can you also use QPdfDocument to create a PDF by code and save it? QPdfWriter unfortunately has one severe restriction - no bookmarks and links.
15 - Jun - 2018
Tobias Koenig
Hej Robert, QPdfDocument only provides API do render PDF documents, but not to assemble them. Links are 'kind of' supported by QPdfWriter, the QPdfEngine class has a member drawHyperlink(QRect, QUrl), so when you use a QPainter that draws on a QPrinter in PDF output mode and include the private header qpdf_p.h, you could do
dynamic_cast<QPdfEngine*>(painter.paintEngine())->drawHyperlink(...)
. So it is private API which can be accessed on your own risk. ;)18 - Jun - 2018
Robert
That's too bad. Thanks for the hint, though!
28 - Sept - 2021
Korbi
Hi, QPdfView is great and easy to implement. I quick got an lightweight pdf viewer. I also implemented a search toolbox to search the pdf for an specific text string. But now I want to highlight the text where I found the string. Is there a method to highlight some text?
29 - Sept - 2021
Tobias Koenig
Hej,
unfortunately there is no public API available yet to highlight the text.
29 - Sept - 2021
Korbi
Is it possible to highlight text in a QPdfView?