mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-06-05 21:59:17 +02:00
Draw space controller
This commit is contained in:
@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user