Skip to content
This repository has been archived by the owner on Jan 2, 2023. It is now read-only.

Add support for rendering PDF combobox form control for <select> element #1848

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

nkahoang
Copy link

Add support for rendering PDF form ComboBox from element (also pull-requested to wkhtmltopdf/qt project)
Include JetBrain IDE's .idea folder into .gitignore

@Nowaker
Copy link

Nowaker commented Jul 20, 2014

@nkahoang FYI: putting your local environment specific directories into gitignore isn't considered a good practise. https://stackoverflow.com/questions/6626136/best-practice-for-adding-gitignore-to-repo

@nkahoang
Copy link
Author

Hi I reversed the .gitignore file and also added support for HiddenField (useful for tagging PDF document then read it again using PdfTk, for example). Qt repo is also updated correspondingly. Please let me know if you need anything else to merge my pull request

Hoang Nguyen added 4 commits July 30, 2014 09:56
…e html rather than the script so that webPrinter can precisely locate the object
…xecution for TextField on validation and onBlur
To write global script, use script tag with data-acroform-include="true"
and set script name with data-acroform-script-name="...".
@ansata2001
Copy link

@nkahoang It doesn't compile, I've cloned your repo and merged it with the latest master from origin and getting this:

../../../qt/include/QtGui/../../../../../qt/src/gui/painting/qpainter.h:458:10: note:   candidate expects 7 arguments, 8 provided
/home/vagrant/wkhtmltopdf/src/lib/pdfconverter.cc:855:54: error: no matching function for call to 'QPainter::addCheckBox(QRectF, QMap<QString, QString>&, bool, QString&, bool)'
     elm.evaluateJavaScript("this.readonly;").toBool());
                                                      ^
/home/vagrant/wkhtmltopdf/src/lib/pdfconverter.cc:855:54: note: candidate is:
In file included from ../../../qt/include/QtGui/qpainter.h:1:0,
                 from ../../../qt/include/QtGui/QPainter:1,
                 from /home/vagrant/wkhtmltopdf/src/lib/pdfconverter_p.hh:33,
                 from /home/vagrant/wkhtmltopdf/src/lib/pdfconverter.cc:22:
../../../qt/include/QtGui/../../../../../qt/src/gui/painting/qpainter.h:459:10: note: void QPainter::addCheckBox(const QRectF&, bool, const QString&, bool)
     void addCheckBox(const QRectF &r, bool checked=false, const QString &name="", bool readOnly=false);
          ^
../../../qt/include/QtGui/../../../../../qt/src/gui/painting/qpainter.h:459:10: note:   candidate expects 4 arguments, 5 provided
/home/vagrant/wkhtmltopdf/src/lib/pdfconverter.cc:857:22: error: 'class QPainter' has no member named 'addHiddenField'
             painter->addHiddenField(
                      ^
/home/vagrant/wkhtmltopdf/src/lib/pdfconverter.cc:879:22: error: 'class QPainter' has no member named 'addComboBox'
             painter->addComboBox(
                      ^
/home/vagrant/wkhtmltopdf/src/lib/pdfconverter.cc:890:26: error: 'class QPainter' has no member named 'addPageJavaScript'
                 painter->addPageJavaScript(

@ashkulz
Copy link
Member

ashkulz commented Dec 25, 2014

You'll need to merge the changes in the Qt repo as well.

@ansata2001
Copy link

@ashkulz I tried to compile it with QT pointing to 82b568bd2e1dfb as in @nkahoang repo and with QT pointing to ccffd0 with same result as above.

@ashkulz
Copy link
Member

ashkulz commented Dec 26, 2014

Sorry, this is not on my priority list of merging/investigation as I am trying to upgrade to Qt5 -- I will consider this afterwards, as this will obviously have to be reimplemented there.

@@ -1041,7 +1100,7 @@ void PdfConverterPrivate::printDocument() {
convertionDone = true;
emit out.finished(true);

qApp->exit(0); // quit qt's event handling
qApp->exit(0); // quit qt"s event handling
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change looks unintentional.

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

Successfully merging this pull request may close these issues.

None yet

5 participants