itext - How to move text written in Type 3 Font from one pdf to other pdf? -
I have a PDF that contains text written in Type3 font.
I have to get some text from it and write it in the other pdf in the same size.
I am using it. Please give me a tip.
EDIT: I attached my code.
DocumentFont f = renderInfo.getFont (); String str = renderInfo.getText (); X = renderinfo.getbasline (). getStartPoint () get (vector.i1); In this code, I want to write str in the x value position. In Type 3 font, does it work?
You can copy the parts of a page and use a new code like this: < / P>
inputstream processing stream = matching (). GetResourceAsStream ("from.pdf"); PDF Reader Reader = New PDF Reader (new file-output stream ("PDF"); Rectangle page = reader.Tetagaysjewelwetting (1); Document document = new document (pages); PdfWriter Author = PdfWriter.getInstance (Document, New FileOutputStream ("areaOfFrom.pdf")); document.open (); PdfContentByte content = author.getDirectContent (); PDF imported page page = author.imagedpage (reader, 1); content.saveState (); Content.rectangle (0, 350, 360, 475); Content.clip (); content.newPath (); Content.addTemplate (pages, 0, 0); content.restoreState (); Document.close (); reader.close (); Change your
goes.
In
Unfortunately, however, that hidden content is only ... hidden ... but it still exists there. You can specifically mark lines with that hidden text and try copying and copying. If you want to completely delete that hidden text (or just copying the desired text), then you have to inspect the contents of the imported page and filter it. I'm afraid the iText does not yet clearly support anything like this. This can be done using the iTextLowal API, but this is something to do.
Comments
Post a Comment