patrik08
8th April 2007, 10:00
I search a way to make link active on pdf export from qt.... && on future to make textinput field , combobox like latex
\usepackage[bookmarks=false]{hyperref} to send and validate data to db or email...
Now if i must make a link enable pdf ( manual how-to ecc.. ) i export html file with my qt apps
svn co https://qt-webdav.svn.sourceforge.net/svnroot/qt-webdav/html_editor/ html_editor
&& open html file on openoffice && export to pdf ...
Is here a way to subclass QPrinter and make link active?
The only way i know is xslt html2fop (apache fop processor) to make link ... and now fop can parse xforms standard to make input field...
But i am sure QPrinter not required java to make the same job....
void Edit_html::MakefilePrintPdf()
{
QString fileName = QFileDialog::getSaveFileName(this, "Export PDF",QString(setter.value("LastDir").toString()), "*.pdf");
if (fileName.size() > 1) {
QApplication::setOverrideCursor(QCursor(Qt::WaitCu rsor));
QPrinter printer(QPrinter::HighResolution);
printer.setOutputFormat(QPrinter::PdfFormat);
if (!fileName.endsWith(".pdf")) {
fileName = fileName+".pdf";
}
QString ultimacartellaaperta = fileName.left(fileName.lastIndexOf("/"))+"/";
setter.setValue("LastDir",ultimacartellaaperta);
printer.setOutputFileName(fileName);
wtext->document()->print(&printer); /* wtext qtextedit */
if (is_file(fileName)) {
QApplication::restoreOverrideCursor();
OpenDesktop(QUrl(fileName));
}
}
QApplication::restoreOverrideCursor();
}
on openoffice 2 pdf export link show like this here....
5 0 obj
<</Type/Annot/Subtype/Link/Border[0 0 0]/Rect[69.5 766 376.4 784.5]/A<</Type/Action/S/URI/URI(http://www.qtcentre.org/component/option,com_weblinks/task,view/catid,14/id,27/)>>
>>
endobj
On latex pdflatex textinput field look like this here....
37 0 obj <<
/Type /Annot
/Rect [567.0667 284.7431 724.9647 298.6908]
/Subtype /Widget /F 4 /T (FIELDNAME) /Q 0 /FT /Tx /BS << /W 1 /S /S >> /MK << /BC [0.85 0.85 0.85] /BG [0.89 0.94 0.95] >> /DA (/Helv 11 Tf 0 0 0 rg ) /DV () /V (VALUEDATAHUMAN) /AA << >>
>> endobj
on attachment the qt pdf output from copy & paste link section qtcentre.org
and same from openoffice
\usepackage[bookmarks=false]{hyperref} to send and validate data to db or email...
Now if i must make a link enable pdf ( manual how-to ecc.. ) i export html file with my qt apps
svn co https://qt-webdav.svn.sourceforge.net/svnroot/qt-webdav/html_editor/ html_editor
&& open html file on openoffice && export to pdf ...
Is here a way to subclass QPrinter and make link active?
The only way i know is xslt html2fop (apache fop processor) to make link ... and now fop can parse xforms standard to make input field...
But i am sure QPrinter not required java to make the same job....
void Edit_html::MakefilePrintPdf()
{
QString fileName = QFileDialog::getSaveFileName(this, "Export PDF",QString(setter.value("LastDir").toString()), "*.pdf");
if (fileName.size() > 1) {
QApplication::setOverrideCursor(QCursor(Qt::WaitCu rsor));
QPrinter printer(QPrinter::HighResolution);
printer.setOutputFormat(QPrinter::PdfFormat);
if (!fileName.endsWith(".pdf")) {
fileName = fileName+".pdf";
}
QString ultimacartellaaperta = fileName.left(fileName.lastIndexOf("/"))+"/";
setter.setValue("LastDir",ultimacartellaaperta);
printer.setOutputFileName(fileName);
wtext->document()->print(&printer); /* wtext qtextedit */
if (is_file(fileName)) {
QApplication::restoreOverrideCursor();
OpenDesktop(QUrl(fileName));
}
}
QApplication::restoreOverrideCursor();
}
on openoffice 2 pdf export link show like this here....
5 0 obj
<</Type/Annot/Subtype/Link/Border[0 0 0]/Rect[69.5 766 376.4 784.5]/A<</Type/Action/S/URI/URI(http://www.qtcentre.org/component/option,com_weblinks/task,view/catid,14/id,27/)>>
>>
endobj
On latex pdflatex textinput field look like this here....
37 0 obj <<
/Type /Annot
/Rect [567.0667 284.7431 724.9647 298.6908]
/Subtype /Widget /F 4 /T (FIELDNAME) /Q 0 /FT /Tx /BS << /W 1 /S /S >> /MK << /BC [0.85 0.85 0.85] /BG [0.89 0.94 0.95] >> /DA (/Helv 11 Tf 0 0 0 rg ) /DV () /V (VALUEDATAHUMAN) /AA << >>
>> endobj
on attachment the qt pdf output from copy & paste link section qtcentre.org
and same from openoffice