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 

Truncating ampersands & and others

 
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
robtester



Joined: 01 Nov 2006
Posts: 2

PostPosted: Wed Nov 01, 2006 9:40 pm    Post subject: Truncating ampersands & and others Reply with quote

I have found that the XGraphicsRdfRenderer.DrawString() truncates strings when the string includes an & symbol( at the &). It also will remove + character from a string (I am sure there are others characters that give strange behavior as well). Is there a way to get these symbols to display on the PDF? What is the list of special characters that will not display?

Rob.
Back to top
View user's profile Send private message
Stefan Lange



Joined: 12 Oct 2006
Posts: 47
Location: Cologne, Germany

PostPosted: Thu Nov 02, 2006 9:06 pm    Post subject: Reply with quote

Hello,

the class XGraphicsPdfRenderer is not intended for beeing used directly in your code (it was public, but this was a mistake). Use only class XGraphics for drawing.

However, I cannot duplicate your observation. Please tell me more details.

>>What is the list of special characters that will not display?
By design there are no such characters.

Regards
Stefan Lange
Back to top
View user's profile Send private message Send e-mail
robtester



Joined: 01 Nov 2006
Posts: 2

PostPosted: Thu Nov 02, 2006 9:18 pm    Post subject: Truncating ampersands & and others Reply with quote

Actually, we are not calling the renderer directly. We traced the call back from XGraphics.DrawString. Given the snippet of code below if we try to draw the a string that contains "Hello & World" the pdf will contain "Hello". If we try "Hello + World" we get "Hello World". If we try "Hello World" we get "Hello World".

XGraphics gfx=XGraphics.FromPdfPage(doc.AddPage(new PdfPage()))

XStringFormat format = new XStringFormat();

format.Alignment=XStringAlignment.Center;
format.LineAlignment=XLineAlignment.Near;

gfx.DrawString(title1,
new XFont("Verdana",12,XFontStyle.Italic),
XBrushes.Black,
new XRect(TITLE_BOX_X,TITLE_BOX_Y,TITLE_BOX_WIDTH,TITLE_BOX_HEIGHT)
,format);
Back to top
View user's profile Send private message
Stefan Lange



Joined: 12 Oct 2006
Posts: 47
Location: Cologne, Germany

PostPosted: Thu Nov 02, 2006 10:09 pm    Post subject: Reply with quote

I believe you, but I have no idea. I tried the "Hello, World" sample and it works. There is no code that eats up special characters.

Please mail me the PDF file that your sample produces.
Back to top
View user's profile Send private message Send e-mail
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