Qt-interest Archive, October 2007
Look for PDF library/wrapper to help Qt programmers.
Message 1 in thread
ALL,
I wish my qt application have the capability to generate pdf document
output, so that text, images, tables or plots created from my
application can draw to pdf and save as a file.
Is there a library which can help Qt programmer like me?
Thanks,
Lingfa
--
[ signature omitted ]
Message 2 in thread
The library is QtGui. The QPrinter object has this built in:
qprinter.setOutputFileName(fileName);
qprinter.setOutputFormat(QPrinter::PdfFormat);
Keith
**Please do not reply to me, reply to the list.**
On 10-26-2007 2:55 PM, "Lingfa Yang" wrote:
> ALL,
>
> I wish my qt application have the capability to generate pdf document
> output, so that text, images, tables or plots created from my
> application can draw to pdf and save as a file.
>
> Is there a library which can help Qt programmer like me?
>
> Thanks,
> Lingfa
>
--
[ signature omitted ]
Message 3 in thread
Keith Esau wrote:
>The library is QtGui. The QPrinter object has this built in:
>
> qprinter.setOutputFileName(fileName);
> qprinter.setOutputFormat(QPrinter::PdfFormat);
>
>
Keith,
That's nice.
Is there a way to open an existing pdf file, page up or page down, or append a new page, then draw?
Regards,
Lingfa
--
[ signature omitted ]
Message 4 in thread
I wish.
No, the Pdf file is output only. No viewer, no reader that I've found.
Keith
**Please do not reply to me, reply to the list.**
On 10-26-2007 3:27 PM, "Lingfa Yang" wrote:
> Keith Esau wrote:
>
>> The library is QtGui. The QPrinter object has this built in:
>>
>> qprinter.setOutputFileName(fileName);
>> qprinter.setOutputFormat(QPrinter::PdfFormat);
>>
>>
>
> Keith,
>
> That's nice.
>
> Is there a way to open an existing pdf file, page up or page down, or append a
> new page, then draw?
>
> Regards,
> Lingfa
--
[ signature omitted ]
Message 5 in thread
On 26.10.07 16:48:07, Keith Esau wrote:
> I wish.
>
> No, the Pdf file is output only. No viewer, no reader that I've found.
There's poppler that has a Qt4 "frontend" (whatever that means, I never
looked into that), which is used by okular KDE4's allround viewing
program.
AFAIK it only gives you a pixmap of pages though and I don't think it
allows to add pages.
Andreas
--
[ signature omitted ]
Message 6 in thread
On Saturday 27 October 2007 06:27:37 am Lingfa Yang wrote:
> Is there a way to open an existing pdf file, page up or page down, or
> append a new page, then draw?
I don't think Qt can do that, but Poppler can do the open and display parts.
There is a Qt-like binding, which you can see here:
http://cgit.freedesktop.org/poppler/poppler/tree/qt4/src/poppler-qt4.h
It may or may not suit your needs.
Poppler can't append pages to an existing PDF document yet, although there is
some interesting work that is close to merge. I don't know of anyone working
on Qt4 bindings for that work at this stage:
http://lists.freedesktop.org/archives/poppler/2007-October/003052.html
Note that poppler is GPL'd.
Brad
--
[ signature omitted ]
Message 7 in thread
On 10/26/07, Lingfa Yang <lingfa@xxxxxxx> wrote:
> Keith Esau wrote:
>
> >The library is QtGui. The QPrinter object has this built in:
> >
> > qprinter.setOutputFileName(fileName);
> > qprinter.setOutputFormat(QPrinter::PdfFormat);
> >
> >
>
> Keith,
>
> That's nice.
>
> Is there a way to open an existing pdf file, page up or page down, or append a new page, then draw?
>
> Regards,
> Lingfa
>
>
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
>
Take a look at http pdfedit (http://pdfedit.petricek.net/pdfedit.index_e).
It uses Qt, and maybe you can get some code from it.
--
[ signature omitted ]