has anyone worked with wxRichtextctrl and wxPDFDoc?  [SOLVED]

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

has anyone worked with wxRichtextctrl and wxPDFDoc?

Postby evstevemd » Sat Jan 15, 2011 6:50 pm

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?
[Ubuntu 15.04/Windows 10 Pro - GCC/MinGW, CodeLite IDE et al]

utelle
Moderator
Moderator
Posts: 767
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Re: has anyone worked with wxRichtextctrl and wxPDFDoc?

Postby utelle » Sat Jan 15, 2011 7:59 pm

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:

Postby Auria » Sat Jan 15, 2011 9:53 pm

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

evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2077
Joined: Wed Jan 28, 2009 11:57 am
Location: United Republic of Tanzania
Contact:

Postby evstevemd » Sat Jan 15, 2011 9:55 pm

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?
[Ubuntu 15.04/Windows 10 Pro - GCC/MinGW, CodeLite IDE et al]

evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2077
Joined: Wed Jan 28, 2009 11:57 am
Location: United Republic of Tanzania
Contact:

Re: has anyone worked with wxRichtextctrl and wxPDFDoc?

Postby evstevemd » Wed Dec 28, 2016 9:34 am

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?
[Ubuntu 15.04/Windows 10 Pro - GCC/MinGW, CodeLite IDE et al]

utelle
Moderator
Moderator
Posts: 767
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

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

Postby utelle » Wed Dec 28, 2016 8:02 pm

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

evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2077
Joined: Wed Jan 28, 2009 11:57 am
Location: United Republic of Tanzania
Contact:

Re: has anyone worked with wxRichtextctrl and wxPDFDoc?

Postby evstevemd » Thu Dec 29, 2016 7:01 am

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?
[Ubuntu 15.04/Windows 10 Pro - GCC/MinGW, CodeLite IDE et al]


Return to “wxCode”

Who is online

Users browsing this forum: No registered users and 2 guests