has anyone worked with wxRichtextctrl and wxPDFDoc? Topic is solved

Talk here about issues with one of the components hosted at wxCode, or suggest features for it.
Post Reply
User avatar
evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2408
Joined: Wed Jan 28, 2009 11:57 am
Location: United Republic of Tanzania

has anyone worked with wxRichtextctrl and wxPDFDoc?

Post 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!
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
utelle
Moderator
Moderator
Posts: 1125
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Re: has anyone worked with wxRichtextctrl and wxPDFDoc?

Post 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
Auria
Site Admin
Site Admin
Posts: 6695
Joined: Thu Sep 28, 2006 12:23 am
Contact:

Post 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
"Keyboard not detected. Press F1 to continue"
-- Windows
User avatar
evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2408
Joined: Wed Jan 28, 2009 11:57 am
Location: United Republic of Tanzania

Post by evstevemd »

thanks buddies,
let me check Urlich's solution If I hit a wall I will go for Aurias
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
User avatar
evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2408
Joined: Wed Jan 28, 2009 11:57 am
Location: United Republic of Tanzania

Re: has anyone worked with wxRichtextctrl and wxPDFDoc?

Post by evstevemd »

is it supporting wxRTC yet?
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
utelle
Moderator
Moderator
Posts: 1125
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Re: has anyone worked with wxRichtextctrl and wxPDFDoc?

Post 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
User avatar
evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2408
Joined: Wed Jan 28, 2009 11:57 am
Location: United Republic of Tanzania

Re: has anyone worked with wxRichtextctrl and wxPDFDoc?

Post 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.
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
Post Reply