0

I'm trying to create a batch of letters using a repeater but so far when I convert the letters to PDF the contents of the letters are written one after the other on the same page. I want to split the repeater up so that each letter has its own page. How do I do this?

Please help me!! :)

1 Answers1

1

usually when you convert to PDF, page breaks are controlled with standard CSS styles like page-break-before:always and page-break-after:always applied to any HTML object. These styles can be used either in a CSS class to be applied to an element or inline in the element style attribute.

so in your repeater you should do something like this (pardon my pseudo code):

<asp:repeater>
<ItemElement>
  <div style="page-break-after:always;">
     <asp:Label id="lblLetter">
  </div>
</Item>
</asp:repeater>

where lblLetter is set to your letter in server-side event.

avs099
  • 10,937
  • 6
  • 60
  • 110