I'm currently working on some xml-templates for the pdf's, and I'm struggling a bit with adding horizontal lines between sections. I have several templates that dispal multiple sections containing information of various kinds. I need to insert the horizontal lines between each section, full page length, but it isn't really working out for me. I assume that this is quite simple, yet I need a bit of guidance on this.
In order to accomplish your requirement, you may consider adding a Graph object (Line) at the end of every section. Please take a look over the following XML which adds a line between two sections of the PDF document. The resultant PDF document is also in attachment, please take a look.
//Instantiate a Pdf document object Pdf pdf1 = new Pdf(); // Bind XML document to be transformed into PDF pdf1.BindXML(@"d:/pdftest/PDFConversiontest.xml",null); // save the PDF document pdf1.Save(@"d:/pdftest/HorizontalLine_Between_Sections.pdf");
It worked. I got the line to display, but I have a very large margin between the last line of the section and the line and the section following immediately behind the line is tucked up very tight to the first line of text in the following section. Any idea on how to make this look a bit better?
Can you please share the resultant PDF document which is generating at your end and if possible, please share some picture which can help us in understanding your requirement.