Pdfsharp and inner pairs

I am trying to fill in the pdf form fields so I use the following code

string filePath = @"c:\test.pdf"; string newPath = @"E\Result"; if(File.Exists(filePath)) { PdfDocument document = PdfReader.Open(filePath, PdfDocumentOpenMode.Modify); // Get the root object of all interactive form fields PdfAcroForm form = document.AcroForm; // Get all form fields of the whole document PdfAcroField.PdfAcroFieldCollection fields = document.AcroForm.Fields; //"/Fields" string[] names = fields.Names; names = fields.DescendantNames; 

the problem is that it gives an error. The PDF name must begin with a slash (/).

I dsicoverd that document.AcroForm has 4 pairs, of which it has the key "/ Fields", how to achieve it

+6
source share
1 answer

We cannot replicate the error "PDF name must begin with a slash (/)". with the provided sample.

This example file uses PDF functions that are not yet supported by PDFsharp. This file cannot be used with PDFsharp.

Not the answer you are looking for. This answer is not very useful, but we cannot help you without the appropriate sample file.

0
source

Source: https://habr.com/ru/post/945922/


All Articles