Thursday, 15 July 2010

java - Make AcroFields(iTextSharp) are non editable and set bold -



java - Make AcroFields(iTextSharp) are non editable and set bold -

i'm using itextsharp populate info pdf templates, created in openoffice. populating fine, i'm getting proper pdf, coming editable mode. want non-editable pdf. , create some rows bold( program). below snippet code.

pdfstamper stamper = new pdfstamper(reader, outputstream); acrofields fields = stamper.getacrofields(); //loop fields.setfield("desc_", "hilinski, mark");

please help me. thanks.

if don't want form editable, utilize form flattening done in filldatasheet example. add together code:

fields.setgenerateappearances(true); stamper.setformflattening(true);

if want alter font of specific fields, utilize setfieldproperty() method alter "textfont" done in textfieldfonts example:

basefont bold = basefont.createfont(basefont.helvetica_bold, basefont.winansi, basefont.not_embedded); form.setfieldproperty("desc_", "textfont", bold, null);

for more info, read official documentation.

java pdf itextsharp itext

No comments:

Post a Comment