@@ -0,0 +1,1997 @@
+package com.wonderfan;%0A%0Aimport com.itextpdf.text.DocumentException;%0Aimport com.itextpdf.text.pdf.PRStream;%0Aimport com.itextpdf.text.pdf.PdfDictionary;%0Aimport com.itextpdf.text.pdf.PdfName;%0Aimport com.itextpdf.text.pdf.PdfObject;%0Aimport com.itextpdf.text.pdf.PdfReader;%0Aimport com.itextpdf.text.pdf.PdfStamper;%0Aimport com.itextpdf.text.pdf.PdfArray;%0A %0Aimport java.io.File;%0Aimport java.io.FileOutputStream;%0Aimport java.io.IOException;%0Aimport java.util.Map;%0A%0Apublic class App %0A%7B%0A    public static final String SRC = %22result/javascript.pdf%22;%0A    public static final String DEST = %22result/changed.pdf%22;%0A %0A    public static void main(String%5B%5D args) throws IOException, DocumentException %7B%0A        File file = new File(DEST);%0A        file.getParentFile().mkdirs();%0A        new App().manipulatePdf(SRC, DEST);%0A    %7D%0A %0A    public void manipulatePdf(String src, String dest) throws IOException, DocumentException %7B%0A        PdfReader reader = new PdfReader(src);%0A        for(int i=1; i%3C= reader.getNumberOfPages(); i++)%7B%0A            PdfDictionary dict = reader.getPageN(i);%0A            //System.out.println(dict.getKeys());%0A            PdfArray elements = dict.getAsArray(PdfName.CONTENTS);%0A            //for(int i=0; i%3C elements.size();i++)%7B%0A                PdfObject object = elements.getDirectObject(elements.size()-1);%0A                //System.out.println(object.isStream());%0A                if (object instanceof PRStream) %7B%0A                    PRStream stream = (PRStream)object;%0A                    byte%5B%5D data = PdfReader.getStreamBytes(stream);%0A                    stream.setData(new String(data,%22UTF8%22).replace(%22www.it-ebooks.info%22, %22wechat:086opensource%22).getBytes());%0A                %7D           %0A            //%7D%0A        %7D%0A        PdfStamper stamper = new PdfStamper(reader, new FileOutputStream(dest));%0A        Map%3CString, String%3E info = reader.getInfo();%0A        info.remove(%22www.it-ebooks.info%22);%0A        stamper.setMoreInfo(info);%0A        stamper.close();%0A        reader.close();%0A    %7D    %0A%7D%0A

Create itext.java