我知道网上已经有一些信息,但我不明白。
我的情况:我有一个 10 页的 PDF,所有页面都包含相同的表格。当我使用我的代码时,只填写了第一页,其他页面仍然是空白的。如果我检查 Adobe Livecycle 中的字段名称,它们在不同页面中都是相同的。
在我的情况下,我应该怎么做才能填满所有页面,而不仅仅是第一页?
我的代码:
//Pagecount == 10
//I was trying to loop through the pages, no success
for(int i=1; i<=pageCount; i++){
form.setField("RecallID", wdContext.currentGetRecallDetailsResponseOutputElement().getRecallid());
form.setField("Afdeling", afdeling);
String type = wdContext.currentGetRecallDetailsResponseOutputElement().getType();
if(type.equals("D"))form.setField("Type", "DESTRUCTION");
else if(type.equals("B"))form.setField("Type", "BLOCK");
form.setField("Description", wdContext.currentGetRecallDetailsResponseOutputElement().getDescription());
form.setField("CreationDate",sdf.format(wdContext.currentGetRecallDetailsResponseOutputElement().getCreationdate()));
form.setField("Enddate", sdf.format(wdContext.currentGetRecallDetailsResponseOutputElement().getEnddate()));
form.setField("Acties", wdContext.currentGetRecallDetailsResponseOutputElement().getAction_Nl());
form.setField("Actions", wdContext.currentGetRecallDetailsResponseOutputElement().getAction_Fr());
form.setField("Probleem", wdContext.currentGetRecallDetailsResponseOutputElement().getProblem_Nl());
form.setField("Probleme", wdContext.currentGetRecallDetailsResponseOutputElement().getProblem_Fr());
}
stamper.setFormFlattening(true);
stamper.close();