Re: [Interest] Creating pdf with QTextDocument with chart

2015-10-27 Thread André Somers via Interest
Op 26-10-2015 om 19:04 schreef Edward Sutton via Interest: If you need to generate PDF’s on iOS, you will need to find a non-Qt approach. Unfortunately Qt PDF generation is implemented in QPrinter and iOS has no printer support. Good thing is that the TS is on Qt 4.8, which does not support i

Re: [Interest] Creating pdf with QTextDocument with chart

2015-10-26 Thread Edward Sutton via Interest
You can add image resources to a QTextDocument. QTextDocument textDocument; textDocument.setPageSize(QSizeF(m_pageWidth, m_pageHeight)); QString htmlImageClient; QImage imageClient(this->m_model->jobInformation()->clientInfo.logoImagePath); if(false == imageClient.isNul

Re: [Interest] Creating pdf with QTextDocument with chart

2015-10-26 Thread Duane
On 26/10/2015 11:48 AM, Jason H wrote: Thanks for the reply. We're using QWT to do the charts. I can save a chart to pdf. what I need is to make a report containing a chart among other things and save that as a PDF file. Qwt has QwtRenderer which is designed for this kind of usecase. You wo

Re: [Interest] Creating pdf with QTextDocument with chart

2015-10-26 Thread Duane
On 26/10/2015 11:47 AM, André Somers wrote: Op 26-10-2015 om 16:45 schreef Duane: Hi André. I know about QwtRenderer. What do you use to create your report if not QTextDocument? I wrote a custom reporting subsystem based on QML templates, not based on QTextDocument for our application. That

Re: [Interest] Creating pdf with QTextDocument with chart

2015-10-26 Thread Jason H
> >> I don't think 4.8 has the ability to paint images in a document. It > >> looks like Qt5 would make a lot of this simpler. > > > > If you read http://doc.qt.io/qt-4.8/richtext-html-subset.html You'll see it > > supports the tag. > > > > Yes but img requires a file name. I'd have to create

Re: [Interest] Creating pdf with QTextDocument with chart

2015-10-26 Thread Duane
On 26/10/2015 12:07 PM, Jason H wrote: I don't think 4.8 has the ability to paint images in a document. It looks like Qt5 would make a lot of this simpler. If you read http://doc.qt.io/qt-4.8/richtext-html-subset.html You'll see it supports the tag. Yes but img requires a file name. I

Re: [Interest] Creating pdf with QTextDocument with chart

2015-10-26 Thread Jason H
> > I don't think 4.8 has the ability to paint images in a document. It > looks like Qt5 would make a lot of this simpler. If you read http://doc.qt.io/qt-4.8/richtext-html-subset.html You'll see it supports the tag. ___ Interest mailing list Inter

Re: [Interest] Creating pdf with QTextDocument with chart

2015-10-26 Thread Duane
On 26/10/2015 11:36 AM, Jason H wrote: From: Duane On 26/10/2015 11:04 AM, Michael Sué wrote: Hi, Maybe you can use QPrinter using a QPainter: QPrinter printer; printer.setOutputFileName("file.pdf"); QPainter painter(&printer); //paint the widget of your text document I was just looki

Re: [Interest] Creating pdf with QTextDocument with chart

2015-10-26 Thread André Somers
Op 26-10-2015 om 16:45 schreef Duane: Hi André. I know about QwtRenderer. What do you use to create your report if not QTextDocument? I wrote a custom reporting subsystem based on QML templates, not based on QTextDocument for our application. That is the context we use it in. André __

Re: [Interest] Creating pdf with QTextDocument with chart

2015-10-26 Thread Jason H
> >> Thanks for the reply. We're using QWT to do the charts. I can save a > >> chart to pdf. what I need is to make a report containing a chart among > >> other things and save that as a PDF file. > > Qwt has QwtRenderer which is designed for this kind of usecase. You > > would render the chart

Re: [Interest] Creating pdf with QTextDocument with chart

2015-10-26 Thread Duane
On 26/10/2015 11:31 AM, André Somers wrote: Op 26-10-2015 om 14:09 schreef Duane: On 23/10/2015 7:40 PM, Sze Howe Koh wrote: On 24 October 2015 at 00:21, Duane wrote: I need to create a document as a pdf file for my application. I can use QTextDocument and html to do most of the document but

Re: [Interest] Creating pdf with QTextDocument with chart

2015-10-26 Thread Jason H
> From: Duane > > On 26/10/2015 11:04 AM, Michael Sué wrote: > > Hi, > > > > Maybe you can use QPrinter using a QPainter: > > > > QPrinter printer; > > printer.setOutputFileName("file.pdf"); > > QPainter painter(&printer); > > > > //paint the widget of your text document > > > > > I was just lo

Re: [Interest] Creating pdf with QTextDocument with chart

2015-10-26 Thread André Somers
Op 26-10-2015 om 14:09 schreef Duane: On 23/10/2015 7:40 PM, Sze Howe Koh wrote: On 24 October 2015 at 00:21, Duane wrote: I need to create a document as a pdf file for my application. I can use QTextDocument and html to do most of the document but I need to add a chart to it. I'm using Qt 4

Re: [Interest] Creating pdf with QTextDocument with chart

2015-10-26 Thread Duane
On 26/10/2015 11:04 AM, Michael Sué wrote: Hi, Maybe you can use QPrinter using a QPainter: QPrinter printer; printer.setOutputFileName("file.pdf"); QPainter painter(&printer); //paint the widget of your text document I was just looking at that. I think this would work but I'd have to ma

Re: [Interest] Creating pdf with QTextDocument with chart

2015-10-26 Thread Jason H
() > Sent: Monday, October 26, 2015 at 10:34 AM > From: Duane > To: interest@qt-project.org > Subject: Re: [Interest] Creating pdf with QTextDocument with chart > > On 26/10/2015 10:24 AM, Jason H wrote: > > The basic fall-back for this is to render the chart as an image. &g

Re: [Interest] Creating pdf with QTextDocument with chart

2015-10-26 Thread Michael Sué
Hi, Maybe you can use QPrinter using a QPainter: QPrinter printer; printer.setOutputFileName("file.pdf"); QPainter painter(&printer); //paint the widget of your text document - Michael. ___ Interest mailing list Interest@qt-project.org http://lists

Re: [Interest] Creating pdf with QTextDocument with chart

2015-10-26 Thread Duane
though, where the font size needs to be manually scaled for logical DPI when using point sizes. Sent: Friday, October 23, 2015 at 12:21 PM From: Duane To: interest@qt-project.org Subject: [Interest] Creating pdf with QTextDocument with chart I need to create a document as a pdf file for my

Re: [Interest] Creating pdf with QTextDocument with chart

2015-10-26 Thread Jason H
manually scaled for logical DPI when using point sizes. > Sent: Friday, October 23, 2015 at 12:21 PM > From: Duane > To: interest@qt-project.org > Subject: [Interest] Creating pdf with QTextDocument with chart > > I need to create a document as a pdf file for my appli

Re: [Interest] Creating pdf with QTextDocument with chart

2015-10-26 Thread Duane
On 23/10/2015 7:40 PM, Sze Howe Koh wrote: > On 24 October 2015 at 00:21, Duane wrote: >> I need to create a document as a pdf file for my application. I can use >> QTextDocument and html to do most of the document but I need to add a >> chart to it. >> >> I'm using Qt 4.8. Any suggestions? > >

Re: [Interest] Creating pdf with QTextDocument with chart

2015-10-23 Thread Sze Howe Koh
On 24 October 2015 at 00:21, Duane wrote: > I need to create a document as a pdf file for my application. I can use > QTextDocument and html to do most of the document but I need to add a > chart to it. > > I'm using Qt 4.8. Any suggestions? Hi Duane, Try the Qt Widgets for Technical Applicati

[Interest] Creating pdf with QTextDocument with chart

2015-10-23 Thread Duane
I need to create a document as a pdf file for my application. I can use QTextDocument and html to do most of the document but I need to add a chart to it. I'm using Qt 4.8. Any suggestions? ___ Interest mailing list Interest@qt-project.org http://li