On Jun 10, 2015, at 11:34 AM, Edward Sutton 
<[email protected]<mailto:[email protected]>> wrote:

I do not know the answer on non-visible XML.  Print as white text?

Another solution is QPrinter which works well for creating PDFs from text and 
images.  Unfortunately QPrinter does not exist for iOS so I spent much time 
implementing a native code version for iOS.

Personally I wish QPrinter PDF capability could be split out of QPrinter so 
that devices that have no printer support could still create PDF reports and 
email them.


Crap. It looks like I could have used QPdfWriter on iOS and saved me a lot of 
Objective-C headaches.  I replaced QPrinter with QPdfWriter and it basically 
seems to work except the fonts in the PDF are extremely tiny.  I may have to 
switch to QPdfWriter now.




QPrinter works well on Android, Linux, OS X, and Windows.


    QPrinter printer(QPrinter::ScreenResolution);

    printer.setOutputFormat(QPrinter::PdfFormat);

    printer.setOutputFileName(pdfFileName);

    printer.setPageOrientation(QPageLayout::Landscape);

I am embarassed that I had not run accross QPdfWriter before.  It sounds like I 
could have used it on iOS but not sure if it handles text and html to PDF.

I need to read the complete list of Qt classes.

-Ed



On Jun 10, 2015, at 9:52 AM, Jason H <[email protected]<mailto:[email protected]>> 
wrote:

I'm wanting to embed content data in XML so that it is query-able by external 
programs. As far as I can tell the QPdFWriter implementation we have is 
primarily for rasterization. Is there a way in Qt to include non-visible XML? 
Would it be a lot of work to add it if it does not exist? Unforunately, I'm 
more familiar with HP/GL and PCL than PDFs.

And I'll even open this up to outside of QML. Has anyone on this list ever 
tried it? I could generate our PDFs with Qt, then patch in via some external 
program the XML into the PDF. That would be acceptable, but not ideal.

Many thanks in advance.



_______________________________________________
Interest mailing list
[email protected]<mailto:[email protected]>
http://lists.qt-project.org/mailman/listinfo/interest

This email and any files transmitted with it from The Charles Machine Works, 
Inc. are confidential and intended solely for the use of the individual or 
entity to which they are addressed. If you have received this email in error 
please notify the sender. Our company accepts no liability for the contents of 
this email, or for the consequences of any actions taken on the basis of the 
information provided, unless that information is subsequently confirmed in 
writing. Please note that any views or opinions presented in this email are 
solely those of the author and do not necessarily represent those of the 
company. Finally, the recipient should check this email and any attachments for 
the presence of viruses. The company accepts no liability for any damage caused 
by any virus transmitted by this email.
_______________________________________________
Interest mailing list
[email protected]<mailto:[email protected]>
http://lists.qt-project.org/mailman/listinfo/interest

This email and any files transmitted with it from The Charles Machine Works, 
Inc. are confidential and intended solely for the use of the individual or 
entity to which they are addressed. If you have received this email in error 
please notify the sender. Our company accepts no liability for the contents of 
this email, or for the consequences of any actions taken on the basis of the 
information provided, unless that information is subsequently confirmed in 
writing. Please note that any views or opinions presented in this email are 
solely those of the author and do not necessarily represent those of the 
company. Finally, the recipient should check this email and any attachments for 
the presence of viruses. The company accepts no liability for any damage caused 
by any virus transmitted by this email.
_______________________________________________
Interest mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to