0
Adobe Acrobat DCを使用して作成可能なPDFフォームがあり、このフォームをURL:http://localhost:49168/WebForm1.aspxに送信したいとします。ASP.NETのFillable PDFフォームフィールドを読み取る
私はAspose.Pdfライブラリを使用して自分のコードで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