我试图通过Android应用程序填充现有pdf的acrofields。当我运行此代码时,应用程序无法创建新文件,或者至少我看不到它。我犯错误的地方?我将现有的pdf放在应用程序的res / raw文件夹中
public class Set1 extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_set1);
try {
PdfReader reader = new PdfReader(getResources().openRawResource(R.raw.liste));
PdfStamper stamper=new PdfStamper(reader,new FileOutputStream("\\res\\raw\\newfile.pdf");
AcroFields acroFields=stamper.getAcroFields();
acroFields.setField("pp","Zagreb");
stamper.close();
}
catch (IOException e) {
e.printStackTrace();
}
catch (DocumentException e) {
e.printStackTrace();
}
}
}