HTML to PDF / DOCX / RTF Java converter library › Forums › PD4ML v3 Archived Forums (Read Only) › PD4ML Tips & Tricks › Conditionnal footer page number › Re: Re: Conditionnal footer page number
November 19, 2012 at 20:21
#29156
Hmm… PD4ML cannot estimate a number of resulting PDF pages before a render() call.
I would recommend to run a first fake conversion procedure to an ignored ByteArrayOutputStream, just to let pd4ml.getLastRenderInfo() return a number of pages. After that you can make a decision either to specify a footer or not.
A feature you need requires a test conversion pass. It makes not much difference if you run it explicitly in your code, or we hide it somewhere in PD4ML logic.