PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index PDFsharp - moved to http://forum.pdfsharp.net/
Please visit the new PDFsharp forum at http://forum.pdfsharp.net/
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problems with Printing Tabs and crlf

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index -> Support - moved to http://forum.pdfsharp.net/
View previous topic :: View next topic  
Author Message
7of42



Joined: 05 Dec 2008
Posts: 2

PostPosted: Fri Dec 05, 2008 11:10 am    Post subject: Problems with Printing Tabs and crlf Reply with quote

Hello,

I have written an website where the user can edit small texts inside an asptextbox. I also enabled the textbox to use the tab-key inside the textbox. Trying to print these texts with pdfsharp I run into two Problems.

1) The crlf is ignored by the drawsting method
oGr.DrawString(sPrintString, fnV9, Brushes.Black, 20, iStart) simply writes one long line of text on the page.
I can solve these problem by spliting the text and print als n-Strings so this is my smaller problem.

2) The bigger problem is, the the size of the tabs is very small in the pdf output. So the print does not look like the text on the Website. I tryed to replace the tabs by spaces ( Chr(160) ) but if I use the messure string method I get a width of 0 for a space.
fsSize = oGr.MeasureString(Chr(160), fnV9, sfFormat)

I would be happy about every tip.

Thanks

7of42
Back to top
View user's profile Send private message
Soldier-B



Joined: 14 Oct 2008
Posts: 16
Location: USA

PostPosted: Fri Dec 05, 2008 1:57 pm    Post subject: Reply with quote

The space character is Chr(32) or the string literal " " not Chr(160).

As far as replacing tabs go, I would figure out how many spaces they use up (usually 4 or 5) and use Strings.StrDup(CharCount, " ").
Back to top
View user's profile Send private message
7of42



Joined: 05 Dec 2008
Posts: 2

PostPosted: Fri Dec 19, 2008 9:08 am    Post subject: Thanks Reply with quote

Hello Soldier-B ,

thanks, for your help. It works now but it works not perfect.

Greetings

7of42

PS I donīt know why but I have not received an email when you answered my question.
Back to top
View user's profile Send private message
Thomas Hoevel



Joined: 16 Oct 2006
Posts: 387
Location: Cologne, Germany

PostPosted: Thu Jan 08, 2009 10:01 am    Post subject: Re: Thanks Reply with quote

Hello!
7of42 wrote:
PS I donīt know why but I have not received an email when you answered my question.

I receive these emails.
You can enable this option for any post. The default setting is in your profile.

Re: Formatting
PDFsharp is low level, MigraDoc is high level.
If you want to deal with Tabs you'd better use MigraDoc. Tabs work similar to those in Word: left, right, decimal, or center alignment, individual positions or default tabs.
_________________
Regards
Thomas Hoevel
PDFsharp Team
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index -> Support - moved to http://forum.pdfsharp.net/ All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group. Hosted by phpBB.BizHat.com


Start Your Own YouTube Clone

Free Web Hosting | Free Forum Hosting | FlashWebHost.com | Image Hosting | Photo Gallery | FreeMarriage.com

Powered by PhpBBweb.com, setup your forum now!
For Support, visit Forums.BizHat.com