unresolved compilation problems:
PdfReader cannot be resolved to a type
PdfStamper cannot be resolved to a type
PdfReader cannot be resolved to a type
PdfStamper cannot be resolved to a type
BaseFont cannot be resolved to a type
BaseFont cannot be resolved
BaseFont cannot be resolved to a variable
BaseFont cannot be resolved to a type
BaseFont cannot be resolved to a type
AcroFields cannot be resolved to a type
如果出现上述错误,应该是jar有冲突:
import com.itextpdf.text.*;
import com.itextpdf.text.pdf.*;
改成以下方式试试
import com.itextpdf.text.pdf.AcroFields;
import com.itextpdf.text.pdf.BaseFont;
import com.itextpdf.text.pdf.PdfReader;
import com.itextpdf.text.pdf.PdfStamper;