Multi Line Text using wxPDFDC

Talk here about issues with one of the components hosted at wxCode, or suggest features for it.
rsb
Earned some good credits
Earned some good credits
Posts: 109
Joined: Fri May 29, 2015 7:26 pm

Multi Line Text using wxPDFDC

Postby rsb » Thu Mar 02, 2017 5:56 pm

Hello,

I'm trying to display multi line text in a PDF Document. It displays as one line.
The lines are passed to the draw routine separated by the newline character. "\n".

We're using wxWidgets 3.1.0 and the latest wxPdfDocument source, 0.95.
Running on Window 7 and building using VS2015.

The multiline text displays fine in our application, but not in our PDF viewer.
Is there a setting I'm missing or am I doing something wrong.

Thanks.

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

Re: Multi Line Text using wxPDFDC

Postby utelle » Fri Mar 03, 2017 11:56 am

rsb wrote:I'm trying to display multi line text in a PDF Document. It displays as one line.
The lines are passed to the draw routine separated by the newline character. "\n".

We're using wxWidgets 3.1.0 and the latest wxPdfDocument source, 0.95.
Running on Window 7 and building using VS2015.

The multiline text displays fine in our application, but not in our PDF viewer.
Is there a setting I'm missing or am I doing something wrong.

Which DC method are you using to display your multiline text? It should work, if you use method DrawText. However, currently it does not work for DrawRotatedText.

Regards,

Ulrich

rsb
Earned some good credits
Earned some good credits
Posts: 109
Joined: Fri May 29, 2015 7:26 pm

Re: Multi Line Text using wxPDFDC

Postby rsb » Fri Mar 03, 2017 3:57 pm

Thanks, I was using DrawRotatedText.

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

Re: Multi Line Text using wxPDFDC

Postby utelle » Fri Mar 03, 2017 4:05 pm

rsb wrote:Thanks, I was using DrawRotatedText.

In earlier versions of wxWidgets multi line output was not supported for DrawText and DrawRotatedText of wxDC. On user request multi line support was added for method DrawText of wxPdfDC. I will try to add multi line support for method DrawRotatedText as well.

Regards,

Ulrich


Return to “wxCode”

Who is online

Users browsing this forum: No registered users and 3 guests