PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sun Jun 30, 2024 11:22 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Wed Nov 28, 2012 7:08 am 
Offline

Joined: Wed Nov 28, 2012 6:42 am
Posts: 3
Hi,
I am new in c# & asp.net(VS2010) and also your library (version - 1.31). Please ignore my language mistake.

I want to print Bank Ceque dynamically. For printing I've setup info according to bank which contain part by part measurement and format of date, amount etc.

I can print pdf with your PDFSharp. But I cannot set the format of amount (which can be local or international or others). How can do that, again I cannot access the XTextFormatter...


Thanks in Advance
Srila


Top
 Profile  
Reply with quote  
PostPosted: Wed Nov 28, 2012 9:54 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3100
Location: Cologne, Germany
Hi!

PDFsharp puts any string into PDF. It's up to you to create a string from the amount, formatted as you need it. C# and .NET provide many formatting options for that purpose.

Maybe I didn't understand the problem.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Thu Nov 29, 2012 3:41 am 
Offline

Joined: Wed Nov 28, 2012 6:42 am
Posts: 3
Hi,

Thanks for your reply, you mean that PDFSharp has no format function to show the currency or date time, I need to use c# functions. OK, then I'll try that way, your reply save my time, so thanks lot. One more question, is there any way to set page unit into Millimeter but font size in point. I set page unit by below code:

FileStream stream = new FileStream(Request.PhysicalApplicationPath + "~BankCeque.pdf", FileMode.OpenOrCreate);
PdfDocument document = new PdfDocument(stream);
PdfPage page = document.AddPage();
page.Size = PageSize.A4;
page.Orientation = PageOrientation.Landscape;
XGraphics gfx = XGraphics.FromPdfPage(page, XGraphicsPdfPageOptions.Replace, XGraphicsUnit.Millimeter);

It seems to me that by doing this it also set the font unit into millimeter, am I right? if so , then how I set the font unit into pt?

Thanks in Advance
Srila


Top
 Profile  
Reply with quote  
PostPosted: Thu Nov 29, 2012 9:53 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3100
Location: Cologne, Germany
Srila wrote:
It seems to me that by doing this it also set the font unit into millimeter, am I right?
I don't know.
I'd just call "XGraphics gfx = XGraphics.FromPdfPage(page);" and use XUnit.FromMillimeter to convert the positions on the page. Font sizes will then be points.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Sun Dec 02, 2012 4:18 am 
Offline

Joined: Wed Nov 28, 2012 6:42 am
Posts: 3
ok, thanks for reply.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 78 guests


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 post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group