Draw space controller

This commit is contained in:
Jakub Melka
2019-01-20 17:55:06 +01:00
parent a9292a4c02
commit 7631265ba4
11 changed files with 458 additions and 17 deletions

View File

@ -3,6 +3,7 @@
#include "pdfdocumentreader.h"
#include "pdfvisitor.h"
#include "pdfstreamfilters.h"
#include <QFileDialog>
#include <QMessageBox>
@ -42,6 +43,18 @@ void PDFViewerMainWindow::onActionOpenTriggered()
{
QMessageBox::information(this, tr("PDF Reader"), tr("Document read error: %1").arg(reader.getErrorMessage()));
}
const pdf::PDFCatalog* catalog = document.getCatalog();
const pdf::PDFPage* page = catalog->getPage(0);
const pdf::PDFObject& contents = page->getContents();
if (contents.isStream())
{
const pdf::PDFStream* stream = contents.getStream();
const QByteArray* compressed = stream->getContent();
pdf::PDFFlateDecodeFilter fd;
QByteArray uncompressed = fd.apply(*compressed, &document, pdf::PDFObject());
}
}
}