RunExamples和pdfDocument找不到引

在测试Aspose.PDF23.11.0过程中,根据帮助文档创建PDF并自定义文本框,并获取该文本框中的内容。
发现RunExamples和pdfDocument找不到引用,提示上下文不存在名称。请问这个是版本的问题,还是需要
其他引用?源码如下:
创建:
string dataDir = “C:/Users/94893/Desktop/”;// RunExamples.GetDataDir_AsposePdf_Forms();
Document pdfDocument = new Document(dataDir + “创建PDF文档.pdf”);
TextBoxField textBoxField = new TextBoxField(pdfDocument.Pages[1], new Aspose.Pdf.Rectangle(100, 200, 250, 250));
textBoxField.PartialName = “textbox1”;
textBoxField.Value = “Text Box”;
Border border = new Border(textBoxField);
border.Width = 5;
border.Dash = new Dash(1, 1);
textBoxField.Border = border;
textBoxField.Color = Aspose.Pdf.Color.FromRgb(System.Drawing.Color.Green);
pdfDocument.Form.Add(textBoxField, 1);
dataDir = dataDir + “TextBox_out.pdf”;
pdfDocument.Save(dataDir);
获取:
string dataDir = “C:/Users/94893/Desktop/”;
Document doc = new Document(dataDir + “TextBox_out.pdf”);
TextBoxField textBoxField = pdfDocument.Form[“textbox1”] as TextBoxField;
另外,有没有一个类似Adobe的可维护PDF模板的工具,能够手动给PDF文件添加输入框或选择框,因为输入框太多的情况下,每个都代码编写,变更时很麻烦。

@jillian

您能分享一下您遇到的错误类型吗?请分享错误的屏幕截图。在使用示例项目之前,您是否确保所有 NuGet 包均已成功恢复?

关于你的第二个问题,你能分享一下你所参考的Adobe工具的链接吗?

lQLPM4c50_1LlR_NASLNAlawnrccZ6cHDLgFTZhDtwC0AA_598_290.png (43.1 KB)

lQLPM4DUvNjfMp_M3M0C8bAMMwY2o-xzaQVNmCejgLQA_753_220.png (24.7 KB)

lQLPM4kAk1NCXB_NAT_NBlywrzx9SRNpUEkFTZgd7MC0AA_1628_319.png (69.1 KB)

截屏及版本见附件

@jillian

我们从 GitHub 下载了示例项目,并将 API 参考更新为 23.11。我们无法注意到您在项目中提到的任何问题。看来该问题与您的特定环境有关。请确保您下载了整个项目,并且所有文件都已正确提取到文件夹中。

如果问题仍然存在,请告知我们。

关于您在第一篇文章中询问的工具,我们担心 API 没有提供任何与 PDF 文档进行图形交互的工具。但是,您只能使用代码隐藏中的API对PDF进行某些操作。