c# - "'System.StackOverflowException" in "OnEndPage" event handler -



c# - "'System.StackOverflowException" in "OnEndPage" event handler -

in code below, can see overrode onendpage event , tried add together paragraph document. however, "system.stackoverflowexception" error when attempting run code. have thought why happening , how can prepare it?

public override void onendpage(pdfwriter writer, document document) { base.onendpage(writer, document); paragraph p = new paragraph("paragraph"); document.add(p); }

it forbidden utilize document.add() in page event. document object passed parameter pdfdocument object. should utilize read-only purposes only. documented in book itext in action - sec edition.

if want add together content in onendpage method, need writer, instance writer.directcontent.

c# itextsharp

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -