Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not getting the document properties and destination #18

Open
rahmanshaber opened this issue Nov 17, 2018 · 0 comments
Open

not getting the document properties and destination #18

rahmanshaber opened this issue Nov 17, 2018 · 0 comments

Comments

@rahmanshaber
Copy link

rahmanshaber commented Nov 17, 2018

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

q

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant