Page 1 of 1

has anyone worked with wxRichtextctrl and wxPDFDoc?

Posted: Sat Jan 15, 2011 6:50 pm
by evstevemd
that will be one of my next assignment in my project soon. If anyone have idea on how the two can work together I would be happy to get direction. I'm not very conversant with wxPDF.

Any direction/idea or anything is appreciated!

Re: has anyone worked with wxRichtextctrl and wxPDFDoc?

Posted: Sat Jan 15, 2011 7:59 pm
by utelle
evstevemd wrote:that will be one of my next assignment in my project soon. If anyone have idea on how the two can work together I would be happy to get direction. I'm not very conversant with wxPDF.

Any direction/idea or anything is appreciated!

If you want to output the contents of a single wxRichtextCtrl only then writing a specialized file handler transforming the contents to PDF could be an option. In the documentation of wxRichtextCtrl it reads "Custom file formats can be supported by creating additional file handlers and registering them with the control."

If you want to output the contents of a window which has a wxRichtextCtrl among other controls you might try to use wxPdfDC which was added to the wxPdfDocument component recently.

Regards,

Ulrich

Posted: Sat Jan 15, 2011 9:53 pm
by Auria
Maybe you can just use the various printing classes, like :

http://docs.wxwidgets.org/trunk/classwx ... nting.html

On Linux and OSX, printing to PDF is available by default; and on Windows, printing to PDF only requires installing the PDFCreator freeware

Posted: Sat Jan 15, 2011 9:55 pm
by evstevemd
thanks buddies,
let me check Urlich's solution If I hit a wall I will go for Aurias

Re: has anyone worked with wxRichtextctrl and wxPDFDoc?

Posted: Wed Dec 28, 2016 9:34 am
by evstevemd
is it supporting wxRTC yet?

Re: has anyone worked with wxRichtextctrl and wxPDFDoc?  [SOLVED]

Posted: Wed Dec 28, 2016 8:02 pm
by utelle
evstevemd wrote:is it supporting wxRTC yet?

Well, the wxPdfDC sample coming with wxPdfDocument demonstrates, how to print the contents of a wxRichTextCtrl to PDF using a wxPdfPrinter instance. That is, the answer to your question is yes.

However, if you are looking for a wxRichTextFileHandler that is capable of producing PDF output, the answer is no. Such a file handler for wxRichTextCtrl unfortunately wasn't implemented yet. (And currently I don't have any plans to do that.)

Regards,

Ulrich

Re: has anyone worked with wxRichtextctrl and wxPDFDoc?

Posted: Thu Dec 29, 2016 7:01 am
by evstevemd
utelle wrote:
evstevemd wrote:is it supporting wxRTC yet?

Well, the wxPdfDC sample coming with wxPdfDocument demonstrates, how to print the contents of a wxRichTextCtrl to PDF using a wxPdfPrinter instance. That is, the answer to your question is yes.

However, if you are looking for a wxRichTextFileHandler that is capable of producing PDF output, the answer is no. Such a file handler for wxRichTextCtrl unfortunately wasn't implemented yet. (And currently I don't have any plans to do that.)

Regards,

Ulrich

Thank you. I wanted to write to PDF regardless of how. So its a fine solution for me.
I didn't knew there was such sample, thank you for pointing that out.