qpdf
qpdf copied to clipboard
not getting the document properties and destination
i am trying to get the pdf file properties . as the properties window is showing with out loading the file so properties window only a blank window . also the i am not getting the file destination with the "getDestinations" function .
is there a separate function to get know the file is loaded ?? if there i need to check if the file is loaded the request for the properties and destination.
` void corepdf::openPdfFile(const QString path) { QVBoxLayout * mainLayout = new QVBoxLayout(); PdfWidget = new QPdfWidget();
connect(PdfWidget, &QPdfWidget::initialized, [this,path]() {
PdfWidget->setToolbarVisible(true);
PdfWidget->showDocumentProperties();
qDebug() << PdfWidget->getDestinations();
QFile f(path);
if (f.open(QIODevice::ReadOnly)) {
QByteArray data = f.readAll();
PdfWidget->loadData(data);
f.close();
}
});
mainLayout->setContentsMargins(0,0,0,0);
mainLayout->addWidget(PdfWidget);
setLayout(mainLayout);
}`
here is the output
thanks