PDFsharp & MigraDoc Foundation
http://forum.pdfsharp.de/

Bank Ceque print dynamically.
http://forum.pdfsharp.de/viewtopic.php?f=2&t=2245
Page 1 of 1

Author:  Srila [ Wed Nov 28, 2012 7:08 am ]
Post subject:  Bank Ceque print dynamically.

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

Author:  Thomas Hoevel [ Wed Nov 28, 2012 9:54 am ]
Post subject:  Re: Bank Ceque print dynamically.

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.

Author:  Srila [ Thu Nov 29, 2012 3:41 am ]
Post subject:  Re: Bank Ceque print dynamically.

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

Author:  Thomas Hoevel [ Thu Nov 29, 2012 9:53 am ]
Post subject:  Re: Bank Ceque print dynamically.

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.

Author:  Srila [ Sun Dec 02, 2012 4:18 am ]
Post subject:  Re: Bank Ceque print dynamically.

ok, thanks for reply.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/