Hi,
We have encountered some issue when we use another tool to redact the area if pdf page has jpeg2000 content on it or if the pdf has some JPXDecode and JBIG2Decode decode filters.
So we are planning to use the Aspose to redact the rectangle area.
Do we have any known issue on this? As we are dealing with the customer’s sensitive data we need to be more cautious on the redacting the pdf files.
Already we are using Aspose to convert MS files and image file to PDF format, do we see any issues if we are applying the redact on those pdf files?
We are using Aspose version 19 and in Java.
Please see the code which we are using to redact, kindly let us know if there is any better suggestions,
PdfAnnotationEditor editor = new PdfAnnotationEditor();
Color color = Color.decode(severColor);
com.aspose.pdf.Rectangle asposeRectangle = createAsposeRectangle(rectangle);
** editor.bindPdf(document);**
** editor.redactArea(1, asposeRectangle, color);**
Path tempPath = Files.createTempFile(page.getDocument().getId().toString(), “.pdf”);
** editor.save(tempPath.toFile().toString());**
Kindly let me know what are the exception can be thrown from this code.
Thanks,
Nathiya
@nathiya1
Can you please share what kind of issues are your experiencing? Also, there are not such known issues in Aspose.PDF API in regards to redact the content. However, we recommend that you try and use the latest available version of the API to get maximum enhancements and fixes and if you notice any issues, we request that you please share your sample source file with us so that we can further proceed with the investigation accordingly.
When we using other tool we faced the below issue,
- When the pdf has JPXDecode (we can see this if we open pdf file in notepad++ tool), it was not redacted the content properly and we were able see the content in thumbnail view.
I am facing the below issue in aspose tool,
- After redacting we can select the text which is available under the redacted area, it should not happen as we need to delete the content permanently under redact area.
I tried both RedactionAnnotation and PdfAnnotationEditor.redactArea, but if I open PDF after redact I can select and copy the text under it.
I need a way to remove the text, images or any other markups under redacted rectangle, pls suggest me a solution
@nathiya1
As requested earlier, would you kindly share your sample document with the screenshot of the issue so that we can further proceed with testing and investigating the issue accordingly.
I have added the sample of Aspose issue,
Major issue is,
Text is moving and overlapping after apply redaction annotation and we can copy the data under redact
Original file before redact,
Pencil.pdf (90.9 KB)
Exported files after redact,
Pencil_output_text_movement.pdf (173.3 KB)
Text Movement Issue.pdf (108.0 KB)
When I apply sever partially it is not removing the markup underneath sever on partial markup.pdf (42.6 KB)
When I use Text fragment it is removing the whole line - Text Fragment.pdf (107.4 KB)
I found the above issue the text movement issue is happening when we redact the content on the rotated page,
Is there any possibility to handle the redact on rotated page?
I have one more question on license, we have an existing license can we use the latest version with the same license?
we are getting below issue,
“The subscription included in this license allows free upgrades until 29 Apr 2020, but this version of the product was released on 27 Jun 2024. Please renew the subscription or use a previous version of the product.”
@nathiya1
About the license, you can use your existing license up to the API version which was released before its expiry date. You can check license expiry date by opening it in a text editor.
Furthermore, we have checked all the files you shared. You shared different files with different issues. Can you please share the code snippet to create all issues in our environment along with the specific rectangle values? This would help us in reproducing all issues in our environment and address them accordingly.
Apologies for the confusion, for now the highest priority issue that we are facing is after we apply the redaction on the page which rotated 90 degree, we could select and copy the data under sever,
here is the code snippet and sample file,
Document document = new Document(“E:\Redaction\Redaction Test Docs\input.pdf”);
com.aspose.pdf.Rectangle asposeRectangle = new Rectangle(425,398,507,507);
com.aspose.pdf.Page page = document.getPages().get_Item(1);
RedactionAnnotation annot = new RedactionAnnotation(page, asposeRectangle);
annot.setFillColor(com.aspose.pdf.Color.fromRgb(Color.PINK));
annot.setColor(com.aspose.pdf.Color.fromRgb(Color.PINK));
page.getAnnotations().add(annot);
annot.redact();
document.save(“D:\test pdf\output\output.pdf”);
Pencil.pdf (90.9 KB)
output.pdf (109.6 KB)
Also, in the output file we are not able to see some text on the right handside (right opposite of the redacted area), pointed out in the below image
image.png (93.1 KB)
@nathiya1
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): PDFJAVA-44164
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
@nathiya1
The ticket in the above message has been logged in our issue tracking system to address the issue of text being selectable even after adding redaction annotation. We were able to reproduce it using 24.6 version of the API.
However, about the missing text, we could not replicate it. Please note that we added annotation in the PDF by considering the page rotation and passing second argument in the method like below:
page.getAnnotations().add(annot, true);
output.pdf (90.4 KB)
May I know the timeline when can we get the fix for this issue?
@nathiya1
As per the free support policies, the issue will be prioritized on a first come first serve basis and its resolution time depends upon its complexity as well as number of the issues logged prior to it. Therefore, we will keep you posted in case we have some progress updates. Please spare us some time.
We are sorry for the inconvenience.