We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Vertical PdfCompositeField

Thread ID:

Created:

Updated:

Platform:

Replies:

93003 Feb 18,2010 08:22 AM Feb 19,2010 04:44 AM Windows Forms 1
loading
Tags: PDF
Asko Niemi
Asked On February 18, 2010 08:22 AM

Hello,

Is it possible to draw a PdfCompositeField vertically? I have a composite field that displays page number and page count. I would like to display the field vertically in page footer.

Here's an example of my code:

PdfPageNumberField pn = new PdfPageNumberField(f, b);
PdfPageCountField pc = new PdfPageCountField(f, b);

PdfCompositeField cf = new PdfCompositeField(f, b, "{0} / {1}", pn, pc);
cf.Bounds = new RectangleF(0, 0, 50, 50);
cf.StringFormat = new PdfStringFormat();
cf.StringFormat.WordWrap = PdfWordWrapType.Word;
cf.StringFormat.Alignment = PdfTextAlignment.Center;
cf.StringFormat.LineAlignment = PdfVerticalAlignment.Middle;

PdfPageTemplateElement footer = new PdfPageTemplateElement(rect)
footer.Graphics.RotateTransform(-90);
cf.Draw(footer.Graphics);

The code above draws the field horizontally even though the coordinate system is rotated.

My Essential Studio version is 7.2.0.37.

Best regards,
Asko

Pravin Joshua D [Syncfusion]
Replied On February 19, 2010 04:44 AM

Hi Asko,

Thank you for using Syncfusion Products.

It is not possible to draw vertical composite field.
PdfPageNumberField and PdfCompositeField are known as dynamic fields(or automatic fields). These fields display information calculated automatically,just before the object is saved.
Hence the text will be drawn only in the horizontal mode, even though Graphics is rotated.

To know more about Dynamic/Automatic fields, Please look into our User Guide in the following link.

http://help.syncfusion.com/ug_74/pdf/DynamicFields1.html

Please let us know if you have any questions.

Regards,
Pravin Joshua D

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;