redaction

Error in draw.rectangle([x1, y1, x2, y2], fill=“Black”) when drawing rectangle with PIL for high dimension images

别等时光非礼了梦想. 提交于 2021-01-28 19:31:47
问题 I'm getting Error in draw.rectangle([x1, y1, x2, y2], fill="Black") when drawing rectangle with PIL python library for high dimension png file(770x1024). But it works for medium size images. img = Image.open(BytesIO(file_byte_string)) width, height = img.size . . if(doc.pages): page = doc.pages[0] . . for field in page.form.fields: if(field.key and field.value): . . x1 = field.value.geometry.boundingBox.left*width y1 = field.value.geometry.boundingBox.top*height-2 x2 = x1 + (field.value

Extracting text marked for redaction in a PDF document using .NET [closed]

北慕城南 提交于 2020-01-05 07:09:29
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . I am working on a PDF acrobat add-on product and one of the requirements is to extract the text marked for redaction in a given PDF document. Assuming you know what is "redaction" ( Please read this if you don't

iText PDFSweep RegexBasedCleanupStrategy not work in some case

…衆ロ難τιáo~ 提交于 2019-12-25 00:59:53
问题 I'm trying to use iText PDFSweep RegexBasedCleanupStrategy to redact some words from pdf, however I only want to redact the word but not appear in other word, eg. I want to redact "al" as single word, but I don't want to redact the "al" in "mineral". So I add the word boundary("\b") in the Regex as parameter to RegexBasedCleanupStrategy, new RegexBasedCleanupStrategy("\\bal\\b") however the pdfAutoSweep.cleanUp not work if the word is at the end of line. 回答1: In short The cause of this issue

How do you programmatically redact PDF FIles?

為{幸葍}努か 提交于 2019-11-30 05:05:12
问题 Adobe Acrobat has the ability to redact PDF files (that is, actually remove the information, rather than simply drawing a black box on top of it). I would like to use this feature programmatically. To redact using the GUI you select the Mark for Redaction Tool, draw it over the text to be redacted, then Apply Redactions. Is there any way to do this programmatically, either through AppleScript or some other way? I know the (X,y) location of the text to be redacted. Thanks! 回答1: You can use