vasu dhulipalla,

vasu_d wrote:
> Here is my requirement 
> 
>  -->the output pdf should have visible signature  immediate to  last-line
> in the pdf. 
> 
>    ( i have done adding signature in the new page) but i need to add
> signature exactly in the last page after last line, if the space available
> otherwise it should create new page & append signature at the beginning. 
> 
>   Is it possible in Itext?. if so, how?

I hope you do have some knowledge about the PDFs that are going to be fed
into your routine. Especially you will need to know what the "last line" on
a page is meant to be and which space is "available" after it.

 * Is the "last line" actually the bottom-most line with text on the page?
   - On the one hand the last PDF page might have some footer text line
while the "last line" to put the signature appearance below is some line
above that footer.
   - On the other hand the "last line" might not be text but some graphic
(e.g. to disable textual copy & paste, it might be inserted as graphics).
Yet again some graphics might be meant as background not to be taken into
account when trying to find the place for the signature.
   - Additionally there might be some widgets on that page. Are they to be
considered?
   - What shall be done if there is no text on the last document page(s)?
   - Shall optional or invisible content be taken into account?

 * Is the "space available" actually all the space till the bottom of the
page?
   - Shall some bottom margin be kept out of that calculation? Is that
margin identical for all incoming documents?
   - Is the media box the relevant base area? Or some other box if present?

Additional complications might arise.

E.g. there might be individual pages in a document (including the final one)
whose orientation is semantically different but not marked accordingly. In
that case the semantic "bottom" might be right and your representation has
to be inserted in a rotated way.

Shall UserUnits be considered when sizing the signature representation?

These are some questions immediately coming to my mind immediately after
reading your requirements. There surely are a number of additional ones
popping up when actually working on a solution.

For a first shot, the margin discovery code Bruno pointed you to is a good
starting point.

Regards,   Michael

--
View this message in context: 
http://itext-general.2136553.n4.nabble.com/Adding-Signature-after-the-last-line-in-PDf-tp3835748p3836145.html
Sent from the iText - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to