0
Adobe Acrobat DC를 사용하여 작성 가능한 채울 수있는 PDF 양식이 있으며이 양식을 URL : http://localhost:49168/WebForm1.aspx에 제출하고 싶습니다.ASP.NET의 Fillable PDF 양식 필드 읽기
내 코드에서 PDF 파일을 읽으려고 Aspose.Pdf 라이브러리를 사용하고 있지만 파일을 읽으려고 할 때마다 "잘못된 파일 형식"이라는 예외가 발생합니다. 아무도이 양식에서 필드를 읽는 방법을 안내하거나 안내 할 수 있습니까?
protected void Page_Load(object sender, EventArgs e)
{
string pdftype = Request.ContentType;
int pdfocument = Request.ContentLength;
try
{
byte[] pdf = new byte[pdfocument];
Stream stream = new MemoryStream(pdf);
Aspose.Pdf.Facades.Form form = new Aspose.Pdf.Facades.Form(stream);
// HttpContext.Request.InputStream.Read(pdf, 0, pdfocument);
Document doc = new Document(stream);
}
catch (Exception ex)
{
}
}
시나리오를 테스트하고 결과를 공유 할 수 있도록 입력 PDF 파일을 공유해주십시오. 이 문제는 문서와 관련이있는 것으로 보입니다. 내 이름은 Nayyer이고 Aspose의 개발자 전도사입니다. – codewarior