![]() The replacement text would simply be "", as you want to remove all instances / cases of a certain piece of text. PDF reader object has function getPage() which takes page number (starting form index 0) as an argument and returns the page object. Head over to this article to learn more about How to Black Out Text in a PDF with the Smallpdf Editing Tool. Even if your document comes in any other format, you can use our Convert PDF tool, which will allow you to convert different file types to PDF. Open the example.pdf and save the file object as pdfFileObj.Ĭreate an object of PdfFileReader and pass the PDF file object whole getting a PDF reader object.Ĭreate an object of PageObject class. Smallpdf’s PDF Editing Tool can also be used in case you need to redact text on any document. PdfReader = PyPDF2.PdfFileReader(pdfFileObj) However, you could extract the data and remove it from memory by using: import PyPDF2 ![]() ![]() In my opinion, your best bet is to open and read your existing file, move it to an editable format, remove whatever text that you don't want present and then convert it back. Is such a thing possible? Yes, although it is not recommended.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |