@Yuri 주셔서 감사합니다. Live Cycle에서 1 개의 텍스트와 1 개의 날짜/시간 및 Submit 및 Print라는 두 개의 버튼으로 간단한 PDF를 만듭니다. 샘플 PDF는 here입니다 :
나는 양식을 작성하여 XML이있어 :
<?xml version="1.0" encoding="UTF-8"?>
<topmostSubform>
<Text1>Chris</Text1>
<DateTimeField1>2012-04-12</DateTimeField1>
</topmostSubform>
나는 PDF로 수입 및 날짜/시간 필드가 작성되었다 Acrobat의 PDF를 볼 때. 다음 코드와 함께 iTextSharp 5.0.5.0을 사용하고 있습니다.
Option Explicit On
Option Strict On
Imports iTextSharp.text
Imports iTextSharp.text.pdf
Imports System.IO
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim PDF_Input_File As String = Path.Combine(My.Computer.FileSystem.SpecialDirectories.Desktop, "Input.pdf")
Dim PDF_Output_File As String = Path.Combine(My.Computer.FileSystem.SpecialDirectories.Desktop, "Export.pdf")
''//Create our reader
Dim reader As New PdfReader(PDF_Input_File)
''//Create our file stream to output to
Using FS As New System.IO.FileStream(PDF_Output_File, FileMode.Create, FileAccess.Write, FileShare.Read)
''//Create the stamper
Dim stamper As New PdfStamper(reader, FS)
''//Just loading the XML raw instead of reading from disk, less files to attach to the post
Dim Bytes = System.Text.Encoding.UTF8.GetBytes("<?xml version=""1.0"" encoding=""UTF-8""?><topmostSubform><Text1>Chris</Text1><DateTimeField1>2012-04-12</DateTimeField1></topmostSubform>")
Using MS As New MemoryStream(Bytes)
''//Fill out the form
stamper.AcroFields.Xfa.FillXfaForm(MS)
End Using
stamper.Close()
End Using
reader.Close()
Me.Close()
End Sub
End Class
해결되었습니다. 나쁜 방법을 사용하고있었습니다. 첨부 파일에 대해서도 마찬가지입니다. – Yuri
전자 서명 (알려진 이름의 기존 필드)을 추가하고 양식을 자동으로 제출하는 방법을 알려주십시오. – Yuri
또한 양식이 성공적으로 제출되었는지 여부를 알려주는 방법이 있습니까? – Yuri