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.

I need to apply pagesize dynamically based on the user selection

Thread ID:

Created:

Updated:

Platform:

Replies:

79595 Feb 17,2009 03:47 AM Feb 18,2009 11:39 AM Windows Forms 3
loading
Tags: PDF
Administrator [Syncfusion]
Asked On February 17, 2009 03:47 AM

Hi,

I need to assign page size selected by user to pdfdocument. As per
My observation pdfPageSize does not support all the sizes supported by Microsoft class
Page setup. My requirement is if user selects postcard size, A4, A6 or letter etc, I need to apply that page size to pdfdocument.

I am using the Syncfusion 6.4.0.15 version

Thanks and Regards

Srinivas


Bhuvaneswari P [Syncfusion]
Replied On February 17, 2009 06:04 AM

Hi Srinivas,

We do have support for setting the Built-in [which are size supported by Microsoft class]and custom page size. Please try to set the required page size by using the below code snippet:


//To set the document page setting using Built-in size
doc.PageSettings.Size = PdfPageSize.Letter;
//doc.PageSettings.Size = PdfPageSize.A6;
//doc.PageSettings.Size = PdfPageSize.A4;


//To set the document page setting by specifing the custom size
doc.PageSettings.Size = new SizeF(100, 100);


Please try this and let us know if this helps you.

Best Regards,
Bhuvana



Administrator [Syncfusion]
Replied On February 17, 2009 08:06 AM

Hi Bhuvana,

Thanks for your reply,That works fine for setting page Size static.My requriment is user
selects page size for eg:-Letter,A4 A6 etc from page setup option.Then i will take pagename from below code

pageSetup.Pagesettings.PageSize.PaperName;

If user selects page Size of Letter than my pageName is in string 'Letter',Now i need to compare this string with pdfPageSize and set the matched pageName to the document.


But i could not able to do that.According to my observation and testing by using pdfPageSize it is not possible to apply page size dynamically.


Please try to understand my requriment.User inputs or selects the page for eg letter,A4 etc.Based on the user selected page i need apply the page size.

Waiting for your reply.

Thanks and Regards
srinivas



Dhivya K [Syncfusion]
Replied On February 18, 2009 11:39 AM

Hi Srinivas,

Thank you for your inquiry! We appreciate the opportunity to assist you.

We have noticed you've submitted a number of specific technical inquiries here in the Forums which seem to indicate you are a current customer rather than an evaluator or tester. If so, you might like to know that you have an existing personal Direct-Trac account available using your own email address, and we highly recommend using your personal account. You'll get a faster response along with an automatic update when your question is answered via Direct-Trac, and you can login and view your incident history 24x7. Simply visit https://www.syncfusion.com/Support/DirectTrac/logon.aspx?URL=/Support/DirectTrac/default.aspx to login. If you have any further questions, we hope you will take advantage of your existing account and services as a license holder.

Regards,
Dhivya.

>Hi Bhuvana,

Thanks for your reply,That works fine for setting page Size static.My requriment is user
selects page size for eg:-Letter,A4 A6 etc from page setup option.Then i will take pagename from below code

pageSetup.Pagesettings.PageSize.PaperName;

If user selects page Size of Letter than my pageName is in string 'Letter',Now i need to compare this string with pdfPageSize and set the matched pageName to the document.


But i could not able to do that.According to my observation and testing by using pdfPageSize it is not possible to apply page size dynamically.


Please try to understand my requriment.User inputs or selects the page for eg letter,A4 etc.Based on the user selected page i need apply the page size.

Waiting for your reply.

Thanks and Regards
srinivas





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.

;