Posted by a ceTe Software moderator
Hello,
The version 3 and previous version of DynamicPDF Merger for .NET product does not support OrderdList and UnOrderdedList.
If you are using version 4 and later version of DynamicPDF Merger for .NET product then you can achieve your requirement by setting the desired X and Y positions to the Overflowlist at the time of getting overflow list items using GetOverFlowList and add it to the same page. This will work for you. Below is the sample code for it.
Document doc = new Document();
Page page1 = new Page();
OrderedList list = new OrderedList(0, 0, 300, page1.Dimensions.Body.Height);
list.ListItemTopMargin = 5;
list.ListItemBottomMargin = 5;
list.BulletPrefix = "(";
list.BulletSuffix = ")";
list.TextColor = RgbColor.HotPink;
ListItem item1 = list.Items.Add("Main List");
item1.Underline = true;
for (int i = 0; i < 100; i++)
{
// Add OrderedSubList under ListItem item1
OrderedSubList subList1 = item1.SubLists.AddOrderedSubList(NumberingStyle.None);
subList1.BulletAlign = Align.Left;
subList1.TextColor = RgbColor.DarkGoldenRod;
ListItem item4 = subList1.Items.Add("sublist "+(i+1));
}
//Adding list to the page.
do
{
list.X = 0;
list.Y = 0;
Page page = new Page();
doc.Pages.Add(page);
page.Elements.Add(list);
list = list.GetOverFlowList(350, 0);
if(list != null)
{
page.Elements.Add(list);
list = list.GetOverFlowList(0, 0);
}
}
while (list != null);
// Save the PDF
doc.Draw(@"C:\MyDocument.pdf");
Thanks,
ceTe Software Support Team.