enow.com Web Search

Search results

  1. Results from the WOW.Com Content Network
  2. How to replace/delete text from a pdf using python?

    stackoverflow.com/questions/52346942

    print(pageObj.extractText()) Extract text from the PDF page. pdfFileObj.close() Close the PDF file object. The replacement text would simply be "", as you want to remove all instances / cases of a certain piece of text. Let's say I converted it into an editable format ( a word or in the text) which itself is not easy.

  3. c.setFillColorRGB(0,0,0) c.drawString([text insert position], [text string]) save this PDF document you've created to a temporary file. Open this PDF document and the document you want to modify using the PyPDF2's PdfFileReader. create a pdfFileWriter object, call it ModifiedDoc. Get page 0 of temporary PDF, call it updatePage.

  4. You can perform the exact phrase, case-sensitive and regular expression redaction (removal) of the text. The following code snippet replaces the word " candy " with " [redacted] " in the loaded PDF document. C#: using (Document doc = Redactor.Load("D:\\candy.pdf")) {. doc.RedactWith(new ExactPhraseRedaction("candy", new ReplacementOptions ...

  5. itext - Removing all text from a PDF - Stack Overflow

    stackoverflow.com/questions/20176614

    Due to a nasty (and now resolved) bug in OS X, some of the OCR'd text is corrupted. I'd like to therefore remove the text from the PDF, and re-OCR the document. For many non-trivial reasons, I don't want to go down the "re-print the document to a PDF" route: I'd prefer to try and repair the document in-place as much as possible.

  6. The most recent versions of Ghostscript support 3 new parameters, which allow you to remove either all TEXT, or all IMAGE or all VECTOR elements from a PDF. To remove all TEXT elements from an input PDF, run. gs -o no-more-texts.pdf -sDEVICE=pdfwrite -dFILTERTEXT input.pdf. To remove all raster IMAGE elements from an input PDF, run.

  7. javascript - PDF.js edit PDF by removing text - Stack Overflow

    stackoverflow.com/questions/76559280/pdf-js-edit-pdf-by-removing-text

    Is it possible to remove a text from PDF using https: ... I would like to remove all texts from PDF and ...

  8. c# - Removing text from PDF - Stack Overflow

    stackoverflow.com/questions/12674195

    You should start by studying ISO-32000-1 (take a couple of weeks). Then you should write a PDF syntax parser that creates 2 different PDFs: one containing the text, one containing the images. Then do whatever magic is needed on the PDF with the images. Finally superimpose the PDF with the text on the PDF with the images.

  9. pdf - PDFBox 2 Remove Text - Stack Overflow

    stackoverflow.com/questions/64823510

    At a base level, I'm trying to remove text from a PDF that matches a regular expression. I can locate the text and the coordinates of the text without issue using a subclass of PDFTextStripper. I am running into issues when using PDFStreamParser to actually remove. I can find text generally using the Tj operator strategy but then I am unable to ...

  10. page = doc.load_page(0) draft = page.search_for("DRAFT") # insert code here to delete the DRAFT text or replace it with an empty string. out_fname = r"final.pdf". doc.save(out_fname) Added 4/28/2022 I found a way to delete the text but unfortunately it also deletes any overlapping text underneath the box around DRAFT.

  11. I have worked on the same requirement and I am able to achieve this by the following steps. Step1: Locating Source Pdf File and Destination file Path. Step2: Read Source Pdf file and Searching for the location of string that we want to replace. Step3: Replacing the string with new one. using iTextSharp.text;