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.
Syncfusion Feedback

RadioButtonList on multiple pages

Thread ID:

Created:

Updated:

Platform:

Replies:

118893 Apr 21,2015 06:54 AM UTC Apr 24,2015 05:37 PM UTC WPF 3
loading
Tags: PDF
Andrea Perazzolo
Asked On April 21, 2015 06:54 AM UTC

Hi,
I have a radiobuotton list with many items located near the bottom of pages.
Each item will be located under the previous and when one of them reach the bound of pages instead to display on the next page, it will be draw at the top of page. 
Is there a method in the API to change the page of each single item?

I guess I will find same issue also for PddfCheckBoxList

This is an extract from my source code:

PdfRadioButtonListField questionRadioList = new PdfRadioButtonListField(pdfPage, "question" + crfQuestion.Id);
            
Answers.ForEach(ans =>
            {
                var startPoint = new PointF();
               
                startPoint.X = _marginLeft;
                startPoint.Y = lastResult.Bounds.Top + (first ? 0 : 20);
                var rbtAns = new PdfRadioButtonListItem(ans.Text);
                rbtAns.Bounds = new RectangleF(startPoint.X, startPoint.Y, 10, 10);
                questionRadioList.Items.Add(rbtAns);
                var answer = new PdfTextElement(ans.Text);
                answer.Font = new PdfTrueTypeFont(f12);
                answer.StringFormat = format;
            });
In attachment there is a pdf generated and in page 4 you could see the problem: at the top there is the radiobutton item coupled to the radiobutton present at the bottom.

Thanks

Attachment: sample_957e2f43.zip

Abirami Selvan [Syncfusion]
Replied On April 22, 2015 04:44 PM UTC

Hi Andrea ,

Thank you for using syncfusion product.

If the radiobuttonlistitem has no space to draw ,It will continue into the page which we have used in the radiobuttonfield . It is our default behavior. So we are not able to fix this behavior as of now .

Please let me know if you have any further assistance .

Thanks,
Abirami.

Andrea Perazzolo
Replied On April 23, 2015 06:34 AM UTC

HI,
Could you tell me if there is a workaround? There is a way to know if the List will not draw on a page and then move on the next Page.
I noticed that the Page member can only be accessed in the Constructor and cannot be changed later.


   Thanks in advance



Abirami Selvan [Syncfusion]
Replied On April 24, 2015 05:37 PM UTC

Hi Andrea,
We have created the workaround solution for your requirement. we have to create the temp document to check whether there is no space to draw the radiobuttonitem for same radiobuttonfield in current page . if there is no space ,we can draw the complete radiobuttonfield in the next page. And there is more number of radio button (exceeds one page)we can increase the document page height using document.pagesettings.height.
We have attached the sample for your reference in below link:
http://www.syncfusion.com/downloads/support/forum/118893/PdfSample-67456436.zip
Please try this and let us know if you need any further assistance.

Thanks,
Abirami.

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.

Warning Icon 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.Close Icon

;