Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/460.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# iTextSharp阅读器javascript错误RSS_C#_Javascript_Asp.net_Pdf_Itextsharp - Fatal编程技术网

C# iTextSharp阅读器javascript错误RSS

C# iTextSharp阅读器javascript错误RSS,c#,javascript,asp.net,pdf,itextsharp,C#,Javascript,Asp.net,Pdf,Itextsharp,我昨天在谷歌iTextSharp上找到了pdf填充数据 但当我试图阅读pdf时,我并没有从pdf中获取acrofields 这是代码 private void ListFieldNames() { string pdfTemplate = @"E:\Vikas\Projects\PdfWriter\PdfWriter\nbc-app.pdf"; // create a new PDF reader based on the PDF template d

我昨天在谷歌iTextSharp上找到了pdf填充数据

但当我试图阅读pdf时,我并没有从pdf中获取acrofields

这是代码

private void ListFieldNames()
    {
        string pdfTemplate = @"E:\Vikas\Projects\PdfWriter\PdfWriter\nbc-app.pdf";


        // create a new PDF reader based on the PDF template document
        PdfReader pdfReader = new PdfReader(pdfTemplate);
        AcroFields formfields = pdfReader.AcroFields;
        // create and populate a string builder with each of the 
        // field names available in the subject PDF

        foreach (KeyValuePair<string, AcroFields.Item> de in formfields.Fields)
        {
            sb.Append(de.Key.ToString() + Environment.NewLine);
        }

        // Write the string builder's content to the form's textbox
        txtbx.TextMode = TextBoxMode.MultiLine;
        txtbx.Width = 500;
        txtbx.Rows = 40;
        txtbx.Text = sb.ToString();

        //txtbx.SelectionStart = 0;
    }
private void ListFieldNames()
{
字符串pdfTemplate=@“E:\Vikas\Projects\PdfWriter\PdfWriter\nbc app.pdf”;
//基于PDF模板文档创建新的PDF阅读器
PdfReader PdfReader=新PdfReader(pdfTemplate);
AcroFields formfields=pdfReader.AcroFields;
//使用以下各项创建并填充字符串生成器:
//主题PDF中提供的字段名称
foreach(formfields.Fields中的KeyValuePair de)
{
sb.Append(de.Key.ToString()+Environment.NewLine);
}
//将字符串生成器的内容写入表单的文本框
txtbx.TextMode=TextBoxMode.MultiLine;
txtbx.宽度=500;
txtbx.Rows=40;
txtbx.Text=sb.ToString();
//txtbx.SelectionStart=0;
}
在调试时,我看到reader.javascript抛出错误(错误如下)

if(typeof(this.ADBE)=“未定义”)
this.ADBE=新对象();
ADBE.LANGUAGE=“ENU”;
ADBE.Viewer\u string\u Title=“Adobe Acrobat”;
ADBE.Viewer\u string\u Update\u Desc=“Adobe交互式表单更新”;
ADBE.Viewer\u string\u Update\u Reader\u Desc=“Adobe Reader 7.0.5”;
ADBE.Reader\u string\u Need\u New\u Version\u Msg=“此PDF文件需要更新版本的Adobe Reader。按“确定”下载最新版本,或与系统管理员联系。”;
ADBE.Viewer\u Form\u string\u Reader\u 601=“此PDF表单需要更新版本的Adobe Reader。虽然表单可能运行正常,但某些元素可能运行不正常或根本不显示。按“确定”启动联机更新或与系统管理员联系。”;
ADBE.Viewer\u Form\u string\u Reader\u Older=“此PDF表单需要更新版本的Adobe Reader。虽然表单可能运行正常,但某些元素可能运行不正常或根本不显示。按“确定”可获取联机下载信息,或与系统管理员联系。”;
ADBE.Viewer\u Form\u string\u Viewer\u 601=“此PDF表单需要更新版本的Adobe Acrobat。虽然表单可能工作正常,但某些元素可能无法正常工作或根本无法显示。请按“确定”启动联机更新或与系统管理员联系。”;
ADBE.Viewer\u Form\u string\u Viewer\u 60=“此PDF表单需要更新版本的Adobe Acrobat。虽然表单可能看起来工作正常,但某些元素可能无法正常工作或根本无法显示。有关详细信息,请复制以下URL(Win上的CTRL+C,Mac上的Command-C)并粘贴到浏览器中,或与系统管理员联系。“;
ADBE.Viewer\u Form\u string\u Viewer\u Older=“此PDF需要较新版本的Acrobat。请复制此URL并粘贴到浏览器中,或与系统管理员联系。”;
ADBE.Viewer\u表单\u字符串\u阅读器\u 5x=“此PDF表单需要更新版本的Adobe Reader。如果没有更新的版本,可能会显示表单,但它可能无法正常工作。某些表单元素可能根本不可见。如果internet连接可用,单击“确定”将打开浏览器,进入一个网页,您可以在该网页上获取最新版本。“;
ADBE.Viewer\u Form\u string\u Reader\u 6\u 7x=“此PDF表单需要更新版本的Adobe Reader。如果没有更新的版本,可能会显示表单,但它可能无法正常工作。某些表单元素可能根本不可见。如果internet连接可用,单击“确定”将下载并安装最新版本。“;
ADBE.Viewer\u Form\u string\u Viewer=“此PDF表单需要更新版本的Adobe Acrobat。如果没有更新的版本,可能会显示表单,但它可能无法正常工作。某些表单元素可能根本不可见。如果internet连接可用,单击“确定”将下载并安装最新版本。“;
if(类型(ADBE.Reader\u ASQUESED值)=“未定义”)
ADBE.Reader\u Value\u Asked=false;
if(typeof(ADBE.Viewer\u Value\u Asked)=“未定义”)
ADBE.Viewer\u Value\u Asked=false;
if(typeof(ADBE.Reader_需要_版本)=“未定义”| | ADBE.Reader_需要_版本<8.1)
{
ADBE.Reader\u Need\u Version=8.1;
ADBE.Reader\u值\u新版本\u URL=”http://cgi.adobe.com/special/acrobat/update";
ADBE.SYSINFO=“?p=“+app.platform+”&v=“+app.viewerVersion+”&l=“+app.language+”&c=“+app.viewerType+”&r=“+ADBE.Reader\u Need\u Version;
}
if(typeof(ADBE.Viewer_需要_版本)=“未定义”| | ADBE.Viewer_需要_版本<8.1)
{
ADBE.Viewer\u Need\u Version=8.1;
ADBE.Viewer\u值\u新版本\u URL=”http://cgi.adobe.com/special/acrobat/update";
ADBE.SYSINFO=“?p=“+app.platform+”&v=“+app.viewerVersion+”&l=“+app.language+”&c=“+app.viewerType+”&r=“+ADBE.Viewer\u Need\u Version;
}
如果(类型化(xfa|U安装)=“未定义”|类型化(xfa|U版本)=“未定义”| xfa|U版本<2.6)
{
如果(app.viewerType==“阅读器”)
{
if(ADBE.Reader\u Value\u Asked!=真)
{
如果(app.viewerVersion<8.0)
{
if(app.alert(ADBE.Reader\u string\u Need\u New\u Version\u Msg,1,1)==1)
this.getURL(ADBE.Reader\u Value\u New\u Version\u URL+ADBE.SYSINFO,false);
ADBE.Reader\u Value\u ask=true;
}
else if(app.alert(ADBE.Viewer\u Form\u string\u Viewer,1,1)=1)
app.findComponent({cType:“Plugin”,cName:“XFA”,cVer:“2.6”});
}
}
其他的
{
if(ADBE.Viewer\u Value\u Asked!=真)
{
如果(app.viewerVersion<7.0)
app.response({cQuestion:ADBE.Viewer\u Form\u string\u Viewer\u Older,cDefault:ADBE.Viewer\u Value\u New\u Version\u URL+ADBE.SYSINFO,cTitle:ADBE.Viewer\u string\u Title});
else if(app.viewerVersion<8.0)
{
if(app.alert(ADBE.Viewer\u Form\u string\u Viewer,1,1)==1)
app.launchURL(ADBE.Viewer\u Value\u New\u Version\u URL+ADBE.SYSINFO,true);
}
else if(app.alert(ADBE.Viewer\u Form\u string\u Viewer,1,1)
if (typeof(this.ADBE) == "undefined")
   this.ADBE = new Object();
ADBE.LANGUAGE = "ENU";
ADBE.Viewer_string_Title = "Adobe Acrobat";
ADBE.Viewer_string_Update_Desc = "Adobe Interactive Forms Update";
ADBE.Viewer_string_Update_Reader_Desc = "Adobe Reader 7.0.5";
ADBE.Reader_string_Need_New_Version_Msg = "This PDF file requires a newer version of Adobe Reader. Press OK to download the latest version or see your system administrator.";
ADBE.Viewer_Form_string_Reader_601 = "This PDF form requires a newer version of Adobe Reader. Although the form may appear to work properly, some elements may function improperly or may not appear at all. Press OK to initiate an online update or see your system administrator.";
ADBE.Viewer_Form_string_Reader_Older = "This PDF form requires a newer version of Adobe Reader. Although the form may appear to work properly, some elements may function improperly or may not appear at all. Press OK for online download information or see your system administrator.";
ADBE.Viewer_Form_string_Viewer_601 = "This PDF form requires a newer version of Adobe Acrobat. Although the form may appear to work properly, some elements may function improperly or may not appear at all. Press OK to initiate an online update or see your system administrator.";
ADBE.Viewer_Form_string_Viewer_60 = "This PDF form requires a newer version of Adobe Acrobat. Although the form may appear to work properly, some elements may function improperly or may not appear at all. For more information please copy the following URL (CTRL+C on Win, Command-C on Mac) and paste into your browser or see your system administrator.";
ADBE.Viewer_Form_string_Viewer_Older = "This PDF requires a newer version of Acrobat. Copy this URL and paste into your browser or see your sys admin.";
ADBE.Viewer_Form_string_Reader_5x = "This PDF form requires a newer version of Adobe Reader. Without a newer version, the form may be displayed, but it might not work properly. Some form elements might not be visible at all. If an internet connection is available, clicking OK will open your browser to a web page where you can obtain the latest version.";
ADBE.Viewer_Form_string_Reader_6_7x = "This PDF form requires a newer version of Adobe Reader. Without a newer version, the form may be displayed, but it might not work properly. Some form elements might not be visible at all. If an internet connection is available, clicking OK will download and install the latest version.";
ADBE.Viewer_Form_string_Viewer = "This PDF form requires a newer version of Adobe Acrobat. Without a newer version, the form may be displayed, but it might not work properly. Some form elements might not be visible at all. If an internet connection is available, clicking OK will download and install the latest version.";

if (typeof(ADBE.Reader_Value_Asked) == "undefined")
   ADBE.Reader_Value_Asked = false;
if (typeof(ADBE.Viewer_Value_Asked) == "undefined")
   ADBE.Viewer_Value_Asked = false;
if (typeof(ADBE.Reader_Need_Version) == "undefined" || ADBE.Reader_Need_Version < 8.1)
{
   ADBE.Reader_Need_Version = 8.1;
   ADBE.Reader_Value_New_Version_URL = "http://cgi.adobe.com/special/acrobat/update";
   ADBE.SYSINFO = "?p=" + app.platform + "&v=" + app.viewerVersion + "&l=" + app.language + "&c=" + app.viewerType + "&r=" + ADBE.Reader_Need_Version;
}
if (typeof(ADBE.Viewer_Need_Version) == "undefined" || ADBE.Viewer_Need_Version < 8.1)
{
   ADBE.Viewer_Need_Version = 8.1;
   ADBE.Viewer_Value_New_Version_URL = "http://cgi.adobe.com/special/acrobat/update";
   ADBE.SYSINFO = "?p=" + app.platform + "&v=" + app.viewerVersion + "&l=" + app.language + "&c=" + app.viewerType + "&r=" + ADBE.Viewer_Need_Version;
}

if (typeof(xfa_installed) == "undefined" || typeof(xfa_version) == "undefined" || xfa_version < 2.6)
{
   if (app.viewerType == "Reader")
   {
      if (ADBE.Reader_Value_Asked != true)
      {
         if (app.viewerVersion < 8.0)
         {
            if (app.alert(ADBE.Reader_string_Need_New_Version_Msg, 1, 1) == 1)
               this.getURL(ADBE.Reader_Value_New_Version_URL + ADBE.SYSINFO, false);
            ADBE.Reader_Value_Asked = true;
         }
         else if (app.alert(ADBE.Viewer_Form_string_Viewer, 1, 1) == 1)
            app.findComponent({cType:"Plugin", cName:"XFA", cVer:"2.6"});
      }
   }
   else
   {
      if (ADBE.Viewer_Value_Asked != true)
      {
         if (app.viewerVersion < 7.0)
            app.response({cQuestion: ADBE.Viewer_Form_string_Viewer_Older, cDefault: ADBE.Viewer_Value_New_Version_URL + ADBE.SYSINFO, cTitle: ADBE.Viewer_string_Title});
           else if (app.viewerVersion < 8.0)
         {
            if (app.alert(ADBE.Viewer_Form_string_Viewer, 1, 1) == 1)
               app.launchURL(ADBE.Viewer_Value_New_Version_URL + ADBE.SYSINFO, true);
         }
         else if (app.alert(ADBE.Viewer_Form_string_Viewer, 1, 1) == 1)
            app.findComponent({cType:"Plugin", cName:"XFA", cVer:"2.6"});
         ADBE.Viewer_Value_Asked = true;
      }
   }
}