QPdfView doesn't render PDF file correctly.
Unsolved
General and Desktop
-
I'm working on an application which used to display a pdf file.
#include <QPdfView> #include <QPdfDocument> #include <QDebug> MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) , ui(new Ui::MainWindow) { ui->setupUi(this); QPdfDocument *document = new QPdfDocument; document->load("E:/multipage.pdf"); QPdfView* view = new QPdfView; view->setDocument(document); view->setPageMode(QPdfView::MultiPage); view->show(); } MainWindow::~MainWindow() { delete ui; }
It can display the pdf file, but the widget annotation was not rendered.
above picture is the pdf opened by adobe reader. The stamp is an widget annotation.
when I open the same file with qt code. The widget annotation was not rendered.Only the text is rendered.What should I do to make it right?
Here is the pdf structure.
Thanks for your help.
-
Hi
I dont think stamping and extensions as such are supported.Try online site like
https://smallpdf.com/pdf-readerand see if that show is.