Thanks for the reply Farhan.
I am using aspose pdf 18.11 with License.
I just want add artifact and content together in a single pdf page. Aspose also successfully added the exact information in pdf page but while opening the pdf in adobe, I am always facing error alert. Below is the code i used.
I found that if i have image inside pdf, i facing the error alert while getting the content. And If remove the image from pdf, I am not facing such issues. But I have get both the artifact and content together without facing any issue. Can you provide solution on this please. I have attached the pdf file as well
Kindly advice.
public static void main(String args[]) throws Exception{
Document doc = new Document(filePath + “Own.pdf”);
Document newDocument = new Document();
newDocument.getPages().insert(1);
Page pdfPage = doc.getPages().get_Item(1);
System.out.println(“artifact size is:::”+pdfPage.getArtifacts().size());
System.out.println(“size is:::”+pdfPage.getContents().size());
newDocument.getPages().get_Item(1).getContents().add(pdfPage.getContents());
newDocument.save(filePath+“test2.pdf”);Own.pdf (162.6 KB)
System.out.println("finish");
}