I am unable to find any open source libraries to render ODF documents using C++. I found ODKit suporting Java and AODL for .NET C#.
Does any one have any idea or provide me any pointers.
I found a Qt source to parse ODF. Qt already has built in ODF writer.
KOffice supports ODF and is written in C++. I suspect they may have solved whatever it is you are trying to solve. http://www.koffice.org
It may not be the most elegant solution but OpenOffice itself is capable of rendering and the OOoSDK can be used from C++ as seen here for writer and here for spreadsheet.
There is none. You're better AODL or any of the other libs available (python, perl, java, etc) and doing a binding to it
KOffice can be an idea, but if I just want to display an odt file in a nice Qt QWidget, but I don't want to depends on DBus and a lots of Kde feature.
The Idea is to take a look a Flake and KoText libs as Thomas Zanders says on this Forum.
Related
I was looking for a Qt implementation (since Qt already support export of rich text to odt) but found none of them.
Then I was astonished that I can't find any C++ class to read/write ods files.
I need to import/export tables with basic formating and was thinking that using a open source format would be a good idea. But it looks like it is mission impossible in C++
I wrote a Qt5 library for working with .ods, check it out:
https://github.com/f35f22fan/QOds
The Calligra framework will let you do this just fine, and since you're looking for a Qt based thing, then that would probably be your best option :) Further information on using Calligra for development can be found here: http://community.kde.org/Calligra
Not exactily what you wanted but check this out:
OpenOffice API
I am trying to open and read a PDF file using Qt, but there is no specific way to do that.
I know the subject is a bit old, but...
I found a really simple way to render PDFs in Qt via QtWebKit using pdf.js (http://mozilla.github.com/pdf.js/).
Here is my realization of the idea for Qt5 and the WebEngine: https://github.com/Archie3d/qpdf
Qt itself does not include PDF reading/rendering functionality as far as I know. You might want to have a look at libpoppler which has Qt bindings.
I found this very interesting article on qt-project.org - "Handling PDF - Qt Project".
This page discusses various available options for working with PDF documents in a Qt application. The page does not exactly show how to "open and display an existing PDF document" but it can help you deduce something useful out of all that is explained there.
Here, the page says:
For rendering pages or elements from existing PDF documents to image
files or in-memory pixmaps (useful e.g. for thumbnail generation or
implementing custom viewers), third-party libraries can be used (for
example: poppler-qt4 (freedesktop.org) and muPDF (mupdf.com)).
Alternatively, the task can be delegated to existing command-line
tools (like poppler-utils (freedesktop.org) and muPDF (mupdf.com)).
You can use PdfViewer which is a lightweight PDF viewer that only uses Qt. It contains a PdfView widget which can be easily embedded in your application.
Simple answer : it is not supported in the Qt API.
Other answer : you can code it, I suggest you have a look at this Qt application which uses Ghostscript
The best way I have found to open a pdf is using QProcess in Qt.
You may want to use okular for pdf proccessing.
I know this is an old post, but I stumbled on it during my initial search so I figured I would post some documentation from the solutions I used.
As of Qt 5.10
Check out the QPdfDocument Class. This class can open a PDF and you can use the render function to render a page to an image. I use the QQuickPaintedItem to then "draw" this image but I am sure there are more ways to handle the QImage output.
Prior to Qt 5.10
I used libpoppler to do a VERY similar process.
#include <poppler/qt5/poppler-qt5.h>
Use the Poppler::Document Class to load and handle the entire PDF document and look at the Poppler::Page::renderToImage function to output the page as a QImage.
Qt does not support reading PDF files out of the box and among many approaches you can use Adobe's PDF Reader ActiveX object along with a QAxObject.
You may want to check out this link which describes how to read PDF files in Qt/C++ using ActiveX and has a downloadable example project.
Similar: Does anyone know of a C/C++ Unix QR-Code library?
I tried libqrencode but apparently it's only able to generate a QR-Code. However, I need a library that reads the data from a photo of a printed QR-Code.
It must be a C, C++ or Objective-C library and it has to compile on BSD systems. On my platform, Java and .NET are not available.
What libraries can I use?
Thanks.
Try using libdecodeqr , it doesn't seem to be updated for over a year but a Google search reveals that it still works.
zxing (http://code.google.com/p/zxing/) is probably the most well-known and used in a number of barcode/qr-code apps. The original/primary code is Java but it includes a C++ port that is pretty actively maintained, particularly for QR codes.
The C++ library does not (currently) have an encoder, but it sounds like you want a decoder.
We want to persist some user settings int he GUI part of our code. I used to do Win32 programming exclusively and the typical way this was done was with registry settings.
I assume that this should be done with configuration files, but was wondering if there was a library or cross platform wrapper that made key/value pair persistence very easy.
Qt's QSettings class handles this:
http://doc.qt.nokia.com/4.6/qsettings.html
Boost.PropertyTree supports XML, JSON, INI config files.
There is also JSON for a lighter alternative of XML. Lots of implementations on that page too.
Qt 4 has a class for it, named QSettings. Looks exactly like what you need.
Why not use an XML as the configuration file. Then you only have to find a cross platform XML library which is easier IMO.
Here is a list of nice XML parsing solutions for C++.
Old school Berkley DB comes to mind.
Have a look at Tokyo Cabinet or at Embedded InnoDB.
In the old days we used .ini files in windows. Here is a portable version of an ini file read/write library
It will work on Windows as well as Linux.
Do you know any open source/free software C++ libraries to manipulate images in these formats:
.jpg .gif .png .bmp ? The more formats it supports, the better. I am implementing a free program in C++ which hides a text file into one or more images, using steganography.
I am working under Unix.
ImageMagick can manipulate about anything and has interfaces for a dozen of languages, including the Magick++ API for C++.
#lurks: I assume that you are looking for LSB shifting? I did some stego work a couple of years ago, and that's how it appeared most apps worked. It appears that ImageMagick (suggested by others) allows you to identify and manipulate the LSBs.
It takes some setting up, but I'm a fan of Adobe's GIL (now part of Boost).
Have you considered GDI?
-- Kevin Fairchild
FreeImage is pretty solid. It has a C interface but is more C++-like in its implementation.
For .png images you could look into Cairo (and CairoMM). There's also Anti-Grain which people consider very fast.
I like vxl
VXL (the Vision-something-Libraries) is a collection of C++ libraries designed for computer vision research and implementation. It was created from TargetJr and the IUE with the aim of making a light, fast and consistent system. VXL is written in ANSI/ISO C++ and is designed to be portable over many platforms.