Adding a pdf file for Redaction C#

@asad.ali

Witness Statement Form DRAFT v1.pdf (103.9 KB)

Please try using this one, these are the type of file I am working with.

Thank you.

@usz.a

This PDF also does not have any form fields inside it. It only contains text content. Since, it does not have any selectable/fillable form fields like Checkboxes or textboxes, you cannot flatten anything in it. How you are using this template to fill out the information?

There are checkboxes and textboxes in the file attached above. For me the concept of flattening a pdf file is to make any interactable area of the file not interactable anymore.

If you can provide me with another example of pdf file that you feel is more suitable that will be appreciated because these are the files that I am working with at the moment.

Apologies if this is becoming a bother

@asad.ali

@usz.a

We are sharing a sample basic PDF file that has acroform field in it. You can find a text box in this PDF that is fillable. Whereas, in your PDF, we could not find any field like it that can be used for interaction.
textbox.pdf (2.3 KB)

@asad.ali

Thank you for sharing that, it gave me a sense of what to expect.

Did you achieve this using the code snippet that I sent above or another?

@usz.a

This file was achieved using the code snippet give in below article:

Please note that flattening a document basically removes/disables form fields in the PDF and places values instead at the same place.

Afternoon @asad.ali

Thank you very much for your help so far and everything has been working quite well.

I am looking to convert convert the result of the flattening method into a PDF/A but I have tried most of the methods you have available but none seem to work. I will post my code snippet below and attach a copy of the XFA form that I am working with.

 public flattenPdfResponse FlattenPdf(flattenPdfRequest request)
    {

        byte[] byteArray = Convert.FromBase64String(request.encodedFileString);

        MemoryStream mem = new MemoryStream();
        mem.Write(byteArray, 0, byteArray.Length);

        // return mem

        MemoryStream returnMem = new MemoryStream();

   
        // Finds forms and other fillable items in the 

        Aspose.Pdf.Document document = new Aspose.Pdf.Document(mem);

       

        if (document.Form.Fields.Count() > 0)
        {
            foreach(var item in document.Form.Fields)   
            {
                item.Flatten();
            }
        }
 document.Convert(mem, PdfFormat.PDF_A_2U, ConvertErrorAction.Delete);
        //document.Validate(returnMem, PdfFormat.PDF_A_2U);

        document.Save(returnMem);<a class="attachment" href="/uploads/default/69639">DS0240B.pdf</a> (185.1 KB)

 return new flattenPdfResponse(returnMem.ToArray(), string.Empty, HttpContext?.User?.Identity?.Name ?? "");

I am working with an XFA form and would just like to convert the result into a PDF/A format.
Thank you.

DS3118.pdf (181.4 KB)

@usz.a

Just for clarification, you need to generate Tagged PDF. Right?? Not just any PDF/A format but only tagged PDF document?

@asad.ali

For now just a PDF/A format is what I need

I want to be able to convert the file below
DS0240B.pdf (185.1 KB)

into something like this PDFen (1).pdf (112.0 KB)

while also flattening the form.

Thank you

@usz.a

We were able to notice that the API was not generating a valid output PDF/A document. Therefore, an issue as PDFNET-52875 has been registered in our issue tracking system for further investigation. We will look into its details and keep you posted with the status of its correction. Please be patient and spare us some time.

We are sorry for the inconvenience.

@asad.ali

Morning, I was wondering if you can provide me with an update for this issue PDFNET-52875. We are trying to deliver latest end of this week.

Thank you.

@usz.a

The ticket has recently been logged in our issue tracking system and we are afraid that it is currently pending for an initial investigation. Please note that the issues in free support model are resolved on a first come first serve basis and resolution time of the issues depend upon their complexity level as well as the number of issues logged prior.

Nevertheless, we have recorded your concerns and will surely inform you once we have some definite updates about ticket resolution. Please be patient and spare us some time.

We are sorry for the inconvenience.

Good morning @asad.ali

Currently I have 3 open tickets with your team and was wondering if we can get updates on them. Also is there a way to be prioritized on the ticket lists? Do we need to have an Aspose License because we already do?

Thank you.

@usz.a

We would like to share with you that tickets in Free support forum are resolved on a first come first serve basis regardless the license type you own. These tickets can be prioritized if you create topic in paid support forum with the reference to ticket IDs. This way the tickets will be escalated to the highest priority as paid support is for the issues that need to be resolved on an urgent basis. As soon as we make some progress towards ticket resolution, we will inform you in the respective forum threads. Please spare us some time.

We apologize for the inconvenience.

Hello @asad.ali

I was wondering if there has been any update on this ticket that we have open?

Thank you.

@usz.a

We are afraid that the ticket has not been resolved. We will surely let you as soon as some news is available about ticket resolution. Please spare us some time.

We are sorry for the inconvenience.