override Draw method in Table subclass

override Draw method in Table subclass

Forum member · Nov 2, 2007
I have a class deriving from PageElements.Table. When I override the Draw method, I get an error if I try to use the PageWriter instance after calling base.Draw(PageWriter). For instance, I'm setting the BorderWidth of my class to 0 because I want to draw grid lines myself. If I draw these grid lines before calling base.Draw, I get a message in the resulting PDF saying "An error exists on this page. Acrobat may not display the page correctly." If I draw the grid lines after calling base.Draw, they do not show up. Sample code: public override void Draw(ceTe.DynamicPDF.IO.PageWriter writer) { _writer = writer; base.Draw(_writer); DrawTableGridLines(); } I've gotten around this in the past by adding Line elements to the page before the overridden Draw method is called, but I want to avoid having to pass my Page object into my custom class. Is there a way to avoid the error in the PDF ? Thanks. Brad

Re: override Draw method in Table subclass

Support · Nov 2, 2007
Hello Brad, Could you send over the code you are using to create and draw this custom page element as well as the output PDF document? Make sure you save the PDF to disk and set the compression level to 0 so we can deal with it easier. Send these both over to [^a|mailto:support@cete.com|support@cete.com^] and we can take a look at them. Thanks, ceTe Software Support Team