This method has also been used for a long time, because the amount of data is less.
At the beginning, Adobe livecycle designer can also be used to insert an empty chapter into a pdf. However, the fieldid of an empty chapter is long.
"Topmostsubform [0]. page1 [0]. A [0] ", cannot be located when checking the kernel. you can use the existing PDF file of the itextsharp connector Stamper!
However, it takes a long time to find the reader flow to the internal writer.
Public void addemptysignature (string strlocalfile, string outputfile)
{
Pdfreader reader = new pdfreader (strlocalfile );
Filestream SiO = new filestream (outputfile, filemode. Create );
Pdfstamper stamp = new pdfstamper (reader, SiO, '\ 0', true );
Specified writer = stamp. Writer;
Pdfformfield field = pdfformfield. createsignature (writer );
Field. setfieldflags (0 );
Pdfborderdictionary border = new pdfborderdictionary (0, 0 );
Field. borderstyle = border;
Pdfacroform PAF = writer. terraform;
PAF. setsignatureparams (field, "signatureid", 30, 50,235,200 );
Stamp. addannotation (field, 1 );
Stamp. formflattening = false;
Stamp. Close ();
// Writer. Close ();
// Reader. Close ();
}