Looking for details for Aspose PDF library for .Net 5, .Net 6, netstandard2.0 & .Net Framework 4.7.2+ for Windows & Linux platforms

Hi,

We are looking for PDF library vendor for our product requirements.

We are looking for PDF library for our Products on .Net 5, .Net 6, netstandard2.0 & .Net Framework 4.7.2+ for Windows & Linux platforms. Do ASPOSE support these?

Looking for below features…

  1. PDF file flattening
    1. Annotations flattening
    2. PDF Form fields flattening
    3. Digital Signatures flattening
    4. Layers flattening
  2. PDF/A to PDF conversion and vice versa.
    1. How to check if PDF is of PDF/A type or not
  3. Secure PDF (like password protected, encrypted, locked, Corrupted), how to check if PDF is one of these?
  4. Package (Portfolio) PDFs to extract the inner PDFs
    1. How to check if PDF a portfolio file or not
  5. Read Digital signature - For existing PDFs, find out if pdf file have
    1. Third party
    2. Self-signed one
    3. Both
  6. PDF metadata Read and edit save.
    1. Process to edit metadata like Keywords, description of PDF file and save
    2. Any provision in Library which can be used to few required details in PDF file?
  7. PDF Read annotations/markups data
    1. Read Markup Annotation fields like…
    1. Identity
    2. Contents
    3. Subject
    4. User
    5. AnnotationType
    6. PageNumber
    7. CreationDate
    8. ModificationDate
    9. Full annotation details
  8. Library should have provision to Kill the process of file edits when it’s stuck
  9. AWS cloud features - S3 direct flatten Or Steaming - If any
  10. How is the license maintained?
    1. Is it different license Key every time we renew?
    2. Do library auto validate key online?
    3. Any suggestions to maintain license in product

@sreenath.techie

Yes, Aspose.PDF does support the shared features.

Aspose.PDF does support .NET Framework, .NET Standard and .NET 5. Please read more detail from here:

We logged a ticket as PDFNET-50918 to test Aspose.PDF functionality under .NET 6.0 in Windows and non-Windows environments.

You can use Annotation.Flatten method to place annotation contents directly on the page, annotation object will be removed. We suggest you please read the following article.
Flatten Annotation from PDF File to XFDF (facades)

Please read following articles.
Convert PDF to PDF/A formats using C#
Convert PDF/A to PDF format using C#

You can use Document.Validate method to validate document into the specified file.

Please read following article about securing PDF.
Securing and signing PDF documents in C#

Following article shows how to work with PDF portfolio.
Working with Portfolio in PDF documents using Aspose.PDF for .NET

PdfFileInfo.HasCollection property returns true if the current input file is a ‘Portfolio’ file containing collection of PDF files in it.

You can read the digital signature using the code example shared in following article.
Working with Signature in PDF File

Working with PDF File Metadata | C#

PDF Annotations

We have created a new post for this query in Aspose.Purchase forum. Our sales team will answer your query as soon as possible.

Could you please share some more detail about these requirements? We will then provide you more information about your query.

How to Flatten below PDF elements?

  1. Layers
  2. Digital signatures
  3. Form fileds
  4. Pop Annotations

@sreenath.techie

We are working over your query and will get back to you soon.

@sreenath.techie

We do not offer any separate functionality to flatten the layers in PDF. The layers are automatically flattened in PDFA format. You can convert your PDF into PDFA in order to obtain flattened layer PDF:

Document doc = new Document("input.pdf");
doc.Convert(new MemoryStream(), PdfFormat.PDF_A_1A, ConvertErrorAction.Delete);
doc.Save("output.pdf");

You can use Form.FlattenAllFields method to flatten all the fields.

You can get annotations of PDF pages using Page.Annotations property and use Annotation.Flatten method to flatten them.

You can use Field.Flatten method to flatten signature field.

  1. For Layers, we just want to flatten it and not convert PDF to PDFA. How can we achieve this?
  2. We want to Flatten Layers, Forms, Annotatons, Digital signatures are in on go with single save of file, how can we get that? Sample code for this would be appreciated.
  3. I used below code, but all annotations are not getting flattened
foreach (var page in pdfDocument.Pages)
                    {
                        foreach (var annotation in page.Annotations)
                        {
                            annotation.Flatten();
                        }

                    }

PdfAnnotationEditor annotationEditor = new PdfAnnotationEditor();
                    annotationEditor.BindPdf(filePath);
                    FlattenSettings flattenSettings = new FlattenSettings
                    {
                        ApplyRedactions = true,
                        CallEvents = false,
                        HideButtons = true,
                        UpdateAppearances = true
                    };
                    annotationEditor.FlatteningAnnotations(flattenSettings);
  1. Digital signatures are also flattened when I used above code

Appreciate response on this.

@sreenath.techie

Could you please ZIP and attach your input and expected output PDF files here for testing? We will investigate the issue and provide you more information on it.

@tahir.manzoor
You can find all Input & Expected output PDF files at https://drive.google.com/drive/folders/1EC_572yDasI3UHq-LZfQdm8tC9YYr88c?usp=sharing

This contains all files we flattened. Details on few are as below…

  1. Layers flattening file : pdf_layer_new.pdf
  2. Digital signed : Elevation Certificate.pdf
    a) Self signed : 1_Self_Signed_Mechanical_signed.pdf
    b) Third party Signed : 1_third_partySigned.pdf
    c) Both signed file : Both Signes Truss Packet- Solera Reserve 57 -13741 Monrovia.pdf , multiple_signed.pdf
  3. PDF/A to PDF file : PDFAscan.pdf
  4. Annotations file : All_Supported_BB_Markups.pdf, bluebeammarkup.pdf
  5. Form fields : FillablePDF.pdf, form_feilds_links_international_support_new.pdf
  6. Long taking time PDF: Parasol Melbourne FA Drawing Set (1)_v1Origin.pdf

These are some files which I was asking for to which Aspose functions I can use to flatten these in one go save. It would be greatly appreciated if you can provide actual code samples for each of them, to make sure POC expedited faster.

@sreenath.techie

You have shared many PDF files around 2GB size. Could you please ZIP and attach the specific files for which you are facing the issues? We will then investigate each PDF file and then provide you more information on your issue.

@tahir.manzoor
I have uploaded new folder called “Specific Files” OR zip file “Specific Files.7z” to the same link https://drive.google.com/drive/folders/1EC_572yDasI3UHq-LZfQdm8tC9YYr88c?usp=sharing
Appreciate if you can check and provide solutions for each of cases

@sreenath.techie

We have logged new feature request as PDFNET-51092 in our issue tracking system for this requirement. We will inform you via this forum thread once this feature is available.

The Form.Flatten throws Aspose.Pdf.Sanitization.SanitizationException. So, we have logged this issue as PDFNET-51093.

We have not found any issue with these documents using latest version of Aspose.PDF for .NET 21.12. We have attached the output PDF files with this post for your kind reference.
Both Signes Truss Packet- Solera Reserve 57 -13741 Monrovia 21.12.pdf (823.1 KB)
1_third_partySigned 21.12.pdf (426.3 KB)
1_Self_Signed_Mechanical_signed 21.12.pdf (165.6 KB)
All_Supported_BB_Markups 21.12.pdf (277.3 KB)
bluebeammarkup 21.12.pdf (1.2 MB)

We are working over your remaining files and will get back to you soon.

@sreenath.techie

Please use Document.RemovePdfaCompliance method to remove pdfa compliance from PDF.

Please check the attached output PDF generated by following code example.
PDFAscan 21.12.pdf (2.1 MB)

We suggest you please use the following code example to achieve your requirement.

var pdfDocument = new Aspose.Pdf.Document(MyDir + "input.pdf");

pdfDocument.Form.Flatten();

foreach (var page in pdfDocument.Pages)
{
    foreach (var annotation in page.Annotations)
    {
        annotation.Flatten();
    }

}

pdfDocument.Flatten();
pdfDocument.RemovePdfaCompliance();
pdfDocument.Save(MyDir + "21.12.pdf", Aspose.Pdf.SaveFormat.Pdf);

Please check the attached output PDF files generated by above code example.

form_feilds_links_international_support_new 21.12.pdf (483.4 KB)
FillablePDF 21.12.pdf (542.2 KB)

Hello,

I’m still experiencing this problem in the 23.4.0.0 version of Aspose.PDF, this problem isn’t fixed yet?

Aspose.Pdf.Document.Flatten()
Aspose.Pdf.Sanitization.SanitizationException: ‘The document uses signature wrapping. The digital signature is compromised’

@duvidasAspose

We are afraid that the earlier logged ticket has not been yet resolved. However, we have recorded your concerns and will surely inform you once we make some progress towards its resolution. Please be patient and spare us some time.

We are sorry for the inconvenience.