public final class FormWeb extends SaveableFacade implements IForm
Representing Acro form Interface.
| Modifier and Type | Class and Description |
|---|---|
static class |
com.aspose.pdf.facades.AForm.FormImportResult
Class which describes result if field import.
|
| Constructor and Description |
|---|
FormWeb()
Construtcor of FormWeb without parameters.
|
FormWeb(IDocument document)
Initializes new
FormWeb object on base of the document. |
FormWeb(IDocument document,
OutputStream destStream)
Initializes new
FormWeb object on base of the document. |
FormWeb(IDocument document,
String destFileName)
Initializes new
FormWeb object on base of the document. |
FormWeb(InputStream srcStream)
Constructor for FormWeb.
|
FormWeb(InputStream inputStream,
javax.servlet.http.HttpServletResponse response)
Creates FormWeb which will save result into HttpResponse object.
|
FormWeb(InputStream srcStream,
OutputStream destStream)
Constructor of FormWeb with two stream parameters.
|
FormWeb(InputStream srcStream,
String destFileName)
Constructor of FormWeb
|
FormWeb(String srcFileName)
Constructor of FormWeb.
|
FormWeb(String inputFile,
javax.servlet.http.HttpServletResponse response)
Creates FormWeb which will save result into HttpResponse object.
|
FormWeb(String srcFileName,
OutputStream destStream)
Constructor of FormWeb.
|
FormWeb(String srcFileName,
String destFileName)
Constructor of FormWeb class.
|
| Modifier and Type | Method and Description |
|---|---|
void |
bindPdf(InputStream srcStream,
String password)
Initializes the facade.
|
void |
bindPdf(String srcFile,
String password)
Initializes the facade.
|
void |
close()
Closes all opened resources used by this document.
|
void |
dispose()
Deprecated.
|
void |
exportFdf(OutputStream outputFdfStream)
Exports the content of the fields of the pdf into the fdf stream.
|
void |
exportXfdf(OutputStream outputXfdfStream)
Exports the content of the fields of the pdf into the xml stream.
|
void |
exportXml(OutputStream outputXmlStream)
Exports the content of the fields of the pdf into the xml stream.
|
void |
extractXfaData(OutputStream outputXmlStream)
Extracts XFA data packet
|
boolean |
fillBarcodeField(String fieldName,
String data)
Fill a barcode field according to its fully qualified field name.
|
boolean |
fillField(String fieldName,
boolean beChecked)
Fills the check box field with a boolean value.
|
boolean |
fillField(String fieldName,
int index)
Fills the radio box field with a valid index value according to a fully qualified field name.
|
boolean |
fillField(String fieldName,
String fieldValue)
Fills the field with a valid value according to a fully qualified field name.
|
void |
fillField(String fieldName,
String[] fieldValues)
Fill a field with multiple selections.Note: only for AcroForm List Box Field.
|
boolean |
fillField(String fieldName,
String value,
boolean fitFontSize)
Fills field with specified value.
|
boolean |
fillFields(String[] fieldNames,
String[] fieldValues,
OutputStream output)
Fills the text box fields with a text values and save the document.
|
void |
fillImageField(String fieldName,
InputStream imageStream)
Overloads function of FillImageField.
|
void |
fillImageField(String fieldName,
String imageFileName)
Pastes an image onto the existing button field as its appearance according to its fully
qualified field name.
|
void |
flattenAllFields()
Flattens all the fields.
|
void |
flattenField(String fieldName)
Flattens a specified field with the fully qualified field name.
|
String |
getAttachmentName()
Gets name of attachment when result of operation is stored into HttpResponse objects as
attachment.
|
String |
getButtonOptionCurrentValue(String fieldName)
Returns the current value for radio button option fields.
|
Hashtable<String,String> |
getButtonOptionValues(String fieldName)
Gets the radio button option fields and related values based on the field name.
|
com.aspose.ms.System.Collections.Generic.Dictionary<String,String> |
getButtonOptionValuesInternal(String fieldName)
Gets the radio button option fields and related values based on the field name.
|
ContentDisposition |
getContentDisposition()
Getshow content will be stored when result of operation is stored into HttpResponse object.
|
String |
getDestFileName()
Deprecated.
|
OutputStream |
getDestStream()
Deprecated.
|
String |
getField(String fieldName)
Gets the field's value according to its field name.
|
FormFieldFacade |
getFieldFacade(String fieldName)
Returns FrofmFieldFacade object containing all appearance attributes.
|
int |
getFieldFlag(String fieldName)
Returns flags of the field.
|
int |
getFieldLimit(String fieldName)
Get the limitation of text field.
|
String[] |
getFieldNames()
Gets list of field names on the form.
|
FieldType |
getFieldType(String fieldName)
Returns type of field.
|
String[] |
getFormSubmitButtonNames()
Gets all form submit button names.
|
String |
getFullFieldName(String fieldName)
Gets the full field name according to its short field name.
|
com.aspose.pdf.facades.AForm.FormImportResult[] |
getImportResult()
Result of last import operation.
|
javax.servlet.http.HttpServletResponse |
getResponse()
Gets or sets Response object where result of operation will be stored.
|
String |
getRichText(String fieldName)
Get a Rich Text field's value, including the formattinf information of every character.
|
SaveOptions |
getSaveOptions()
Gets or sets save options when result is stored as HttpResponse.
|
String |
getSrcFileName()
Deprecated.
|
InputStream |
getSrcStream()
Gets source stream.
|
SubmitFormFlag |
getSubmitFlags(String fieldName)
Returns the submit button's submission flags
|
void |
importFdf(InputStream inputFdfStream)
Imports the content of the fields from the fdf file and put them into the new pdf.
|
void |
importXfdf(InputStream inputXfdfStream)
Imports the content of the fields from the xfdf(xml) file and put them into the new pdf.
|
void |
importXml(InputStream inputXmlStream)
Imports the content of the fields from the xml file and put them into the new pdf.
|
void |
importXml(InputStream inputXmlStream,
boolean IgnoreFormTemplateChanges)
Imports the content of the fields from the xml file and put them into the new pdf.
|
void |
importXml(String inputXml)
Imports the content of the fields from the xml file and put them into the new pdf.
|
boolean |
isRequiredField(String fieldName)
Determines whether field is required or not.
|
void |
renameField(String fieldName,
String newFieldName)
Renames a field.
|
void |
save()
Saves the value of the filled fields and close the opened Pdf document.
|
void |
save(OutputStream destStream)
Saves document into specified stream.
|
void |
save(String destFile)
Saves document into specified file.
|
void |
setAttachmentName(String value)
Sets name of attachment when result of operation is stored into HttpResponse objects as
attachment.
|
void |
setContentDisposition(ContentDisposition value)
Sets how content will be stored when result of operation is stored into HttpResponse object.
|
void |
setConvertTo(PdfFormat value)
Sets PDF file format.
|
void |
setDestFileName(String value)
Deprecated.
|
void |
setDestStream(OutputStream value)
Deprecated.
|
void |
setResponse(javax.servlet.http.HttpServletResponse value)
Gets or sets Response object where result of operation will be stored.
|
void |
setSaveOptions(SaveOptions value)
Gets or sets save options when result is stored as HttpResponse.
|
void |
setSrcFileName(String value)
Deprecated.
|
void |
setSrcStream(InputStream value)
Gets source stream.
|
void |
setXfaData(InputStream inputXmlStream)
Replaces XFA data with specified data packet.
|
bindPdf, bindPdf, bindPdf, getDocumentequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, exportFdf, exportXfdf, exportXml, fillBarcodeField, fillField, fillField, fillField, fillField, fillField, fillImageField, fillImageField, flattenAllFields, flattenField, getAttachmentName, getButtonOptionCurrentValue, getButtonOptionValues, getButtonOptionValuesInternal, getContentDisposition, getDestFileName, getDestStream, getDocument, getField, getFieldFacade, getFieldFlag, getFieldLimit, getFieldNames, getFieldType, getFormSubmitButtonNames, getFullFieldName, getRichText, getSaveOptions, getSrcFileName, getSrcStream, getSubmitFlags, importFdf, importXfdf, importXml, importXml, renameField, setAttachmentName, setContentDisposition, setConvertTo, setDestFileName, setDestStream, setSaveOptions, setSrcFileName, setSrcStreampublic FormWeb()
Construtcor of FormWeb without parameters.
FormWeb FormWeb = new com.aspose.pdf.facades.FormWeb();
FormWeb.setSrcFileName("file.pdf");
public FormWeb(IDocument document)
Initializes new FormWeb object on base of the document.
document - Pdf document.public FormWeb(IDocument document, OutputStream destStream)
Initializes new FormWeb object on base of the document.
document - Pdf document.destStream - Destination stream.public FormWeb(IDocument document, String destFileName)
Initializes new FormWeb object on base of the document.
document - Pdf document.destFileName - Path of the destination file.public FormWeb(InputStream srcStream)
Constructor for FormWeb.
FormWeb FormWeb = new FormWeb(new FileInputStream("PdfFormWeb.pdf"));
srcStream - source stream.public FormWeb(InputStream inputStream, javax.servlet.http.HttpServletResponse response)
Creates FormWeb which will save result into HttpResponse object.
inputStream - Stream containing source document.response - HttpResponse object where result will be saved.public FormWeb(InputStream srcStream, OutputStream destStream)
Constructor of FormWeb with two stream parameters. Specify same source and destination stream for incremental update.
FormWeb FormWeb = new FormWeb(new FileInputStream("InFile.pdf"), new FileOutputStream("OutFile.pdf"));
srcStream - Source stream.destStream - Destination stream.public FormWeb(InputStream srcStream, String destFileName)
Constructor of FormWeb
FormWeb FormWeb = new FormWeb(new FileInputStream("PdfFormWeb.pdf"), "PdfFormWeb_Updated.pdf");
srcStream - Source stream.destFileName - Destination file path.public FormWeb(String srcFileName)
Constructor of FormWeb.
FormWeb FormWeb = new FormWeb("PdfFormWeb.pdf");
srcFileName - Source file path.public FormWeb(String inputFile, javax.servlet.http.HttpServletResponse response)
Creates FormWeb which will save result into HttpResponse object.
inputFile - Name of input file.response - HttpResponse object where result will be stored.public FormWeb(String srcFileName, OutputStream destStream)
Constructor of FormWeb.
FormWeb FormWeb = new FormWeb("PdfFormWeb.pdf", "PdfFormWeb_Updated.pdf");
srcFileName - Source file path.destStream - Destination file path.public FormWeb(String srcFileName, String destFileName)
Constructor of FormWeb class. Specify same source file name and destination file name to perFormWeb incremental update.
FormWeb FormWeb = new FormWeb("PdfFormWeb.pdf", "PdfFormWeb_Updated.pdf");
srcFileName - Path of the source file.destFileName - Path of the destination file.public javax.servlet.http.HttpServletResponse getResponse()
Gets or sets Response object where result of operation will be stored.
public void setResponse(javax.servlet.http.HttpServletResponse value)
Gets or sets Response object where result of operation will be stored.
value - HttpServletResponse objectpublic void save()
Saves the value of the filled fields and close the opened Pdf document.
Form form = new Form("PdfForm.pdf", "PdfForm_Changed.pdf");
form.fillField("textField", "new value");
form.save();
public com.aspose.pdf.facades.AForm.FormImportResult[] getImportResult()
Result of last import operation. Array of objects which descibre result of import for each field.
@Deprecated public String getSrcFileName()
Gets source file name.
Form form = new com.aspose.pdf.Form();
form.setSrcFileName("file.pdf");
getSrcFileName in interface IForm@Deprecated public void setSrcFileName(String value)
Sets source file name.
setSrcFileName in interface IFormvalue - String objectpublic void setConvertTo(PdfFormat value)
Sets PDF file format. Result file will be saved in specified file format. If this property is not specified then file will be save in default PDF format without conversion.
setConvertTo in interface IFormvalue - PdfFormat elementPdfFormat@Deprecated public String getDestFileName()
Gets destination file name.
getDestFileName in interface IForm@Deprecated public void setDestFileName(String value)
Sets destination file name.
Form form = new com.aspose.pdf.Form();
form.setDestFileName("file.pdf");
setDestFileName in interface IFormvalue - String objectpublic InputStream getSrcStream()
Gets source stream.
getSrcStream in interface IFormpublic void setSrcStream(InputStream value)
Gets source stream.
Form form = new com.aspose.pdf.Form();
form.setSrcStream (new FileInputStream("source.pdf")));
setSrcStream in interface IFormvalue - InputStream object@Deprecated public OutputStream getDestStream()
Gets or sets destination stream.
getDestStream in interface IForm@Deprecated public void setDestStream(OutputStream value)
Gets destination stream.
Form form = new com.aspose.pdf.Form();
form.setDestStream (new FileInputStream("file.pdf"));
setDestStream in interface IFormvalue - OutputStream objectpublic void bindPdf(InputStream srcStream, String password)
Initializes the facade.
public String[] getFieldNames()
Gets list of field names on the form.
Form form = new Form("PdfForm.pdf");
String[] fields = form.getFieldNames();
for(String field : fields)
{
System.out.println(field);
}
getFieldNames in interface IFormpublic String[] getFormSubmitButtonNames()
Gets all form submit button names.
Form form = new Form("PdfForm.pdf");
String[] submits = form.getFormSubmitButtonNames();
for(String btn : submits)
{
System.out.println(btn);
}
getFormSubmitButtonNames in interface IFormpublic FormFieldFacade getFieldFacade(String fieldName)
Returns FrofmFieldFacade object containing all appearance attributes.
com.aspose.pdf.facades.Form form = new com.aspose.pdf.facades.Form("form.pdf"));
FormFieldFacade field = form.getFieldFacade("field1");
System.out.println("Color of field border: " + field.getBorderColor());
getFieldFacade in interface IFormfieldName - Name of field to read.public boolean fillField(String fieldName, String fieldValue)
Fills the field with a valid value according to a fully qualified field name. Before filling the fields, every field's names and its corresponding valid values must be known. Both the fields' name and values are case sensitive. Please note that Facades supports only full field names and does not work with partial field names in contrast with Aspose.Pdf.Kit; For example if field has full name "Form.Subform.TextField" you should specify full name and not "TextField". You can use FieldNames property to explore existing field names and search required field by its partial name.
Form form = new Form("PdfForm.pdf");
form.fillField("FirstName", "John");
form.fillField("LastName", "Smith");
//how to search field by its partial name:
Form form = new Form("input.pdf", "output.pdf");
for(String fieldName : form.getFieldNames())
{
if (fieldName.endsWith("TextField"))
{
System.out.println("Full name is: " + fieldName);
}
}
public boolean fillField(String fieldName, int index)
Fills the radio box field with a valid index value according to a fully qualified field name. Before filling the fields, only field's name must be known. While the value can be specified by its index. Notice: Only be applied to Radio Box, Combo Box and List Box fields. Please note that Facades supports only full field names and does not work with partial field names in contrast with Aspose.Pdf.Kit; For example if field has full name "Form.Subform.ListBoxField" you should specify full name and not "ListBoxField". You can use FieldNames property to explore existing field names and search required field by its partial name.
Form form = new Form("PdfForm.pdf");
form.fillField("listboxField", 2);
form.fillField("comboboxField", 2);
form.fillField("radiobuttonField", 2);
//how to search field by its partial name:
Form form = new Form("input.pdf", "output.pdf");
for(String fieldName : form.getFieldNames())
{
if (fieldName.endsWith("ListBoxField"))
{
System.out.println("Full name is: " + fieldName);
}
}
public final boolean fillFields(String[] fieldNames, String[] fieldValues, OutputStream output) throws IOException
Fills the text box fields with a text values and save the document. Relevant for signed documents. Notice: Only be applied to Text Box. Both the fields' name and values are case sensitive.
Form form = new Form(dataDir + "SignedPdfForm.pdf");
form.FillFields(new string[] {"Field1"}, new string[] {"+"}, stream);
fieldNames - Names of fields.fieldValues - New values of the fields.output - Stream where document will be saved.IOException - throws exceptionpublic boolean fillField(String fieldName, boolean beChecked)
Fills the check box field with a boolean value. Notice: Only be applied to Check Box. Please note that Aspose.Pdf.Facades supports only full field names and does not work with partial field names in contrast with Aspose.Pdf.Kit; For example if field has full name "Form.Subform.CheckBoxField" you should specify full name and not "CheckBoxField". You can use FieldNames property to explore existing field names and search required field by its partial name.
Form form = new Form("PdfForm.pdf");
form.fillField("checkboxField", true);
//how to search field by its partial name:
Form form = new Form("input.pdf", "output.pdf");
for(String fieldName : form.getFieldNames())
{
if (fieldName.endsWith("CheckBoxField"))
{
System.out.println("Full name is: " + fieldName);
}
}
public String getButtonOptionCurrentValue(String fieldName)
Returns the current value for radio button option fields.
Form form = new Form("PdfForm.pdf");
System.out.println(form.GetButtonOptionCurrentValue("btnField"));
getButtonOptionCurrentValue in interface IFormfieldName - Field NameGetButtonOptionValuespublic com.aspose.ms.System.Collections.Generic.Dictionary<String,String> getButtonOptionValuesInternal(String fieldName)
Gets the radio button option fields and related values based on the field name. This method has meaning for radio button groups.
Form form = new Form("PdfForm.pdf");
Hashtable values = form.getButtonOptionValues("Color");
System.out.println(values["White"].toString());
System.out.println(values["Black"].toString());
getButtonOptionValuesInternal in interface IFormfieldName - Field Namepublic Hashtable<String,String> getButtonOptionValues(String fieldName)
Gets the radio button option fields and related values based on the field name. This method has meaning for radio button groups.
Form form = new Form("PdfForm.pdf");
java.util.Map values = form.getButtonOptionValues("Color");
System.out.println(values.get("White").toString());
System.out.println(values.get("Black").toString());
getButtonOptionValues in interface IFormfieldName - Field Namepublic String getField(String fieldName)
Gets the field's value according to its field name.
Form form = new Form("PdfForm.pdf");
System.out.println("Field value = " + form.getField("Field1"));
public String getFullFieldName(String fieldName)
Gets the full field name according to its short field name.
Form form = new Form("PdfForm.pdf");
System.out.println("Full field name is : " + form.getFullFieldName("textField"));
getFullFieldName in interface IFormfieldName - The fully qualified field name.public int getFieldLimit(String fieldName)
Get the limitation of text field.
Form form = new Form("PdfForm.pdf");
System.out.println(form.getFieldLimit("textfieldBox"));
getFieldLimit in interface IFormfieldName - The qualified field name.public void save(String destFile)
Saves document into specified file.
save in interface ISaveableFacadesave in class SaveableFacadedestFile - File where document will be saved.public void save(OutputStream destStream)
Saves document into specified stream.
save in interface ISaveableFacadesave in class SaveableFacadedestStream - Stream where document will be saved.@Deprecated public void dispose()
Closes all opened resources used by this document.
This method is obsolete, use close() instead.public void close()
Closes all opened resources used by this document.
public void flattenAllFields()
Flattens all the fields.
Form form = new Form("PdfForm.pdf");
form.flattenAllFields();
flattenAllFields in interface IFormpublic void flattenField(String fieldName)
Flattens a specified field with the fully qualified field name. Any other field will remain unchangable. If the fieldName is invalid, all the fields will remain unchangable.
Form form = new Form("PdfForm.pdf");
form.flattenField("textField");
flattenField in interface IFormfieldName - The name of the field to be flattened.public boolean fillBarcodeField(String fieldName, String data)
Fill a barcode field according to its fully qualified field name.
Form form = new Form("PdfForm.pdf");
form.fillBarcodeField("textField", "42207252");
fillBarcodeField in interface IFormfieldName - The fully qualified field name.data - The new barcode value.public void importFdf(InputStream inputFdfStream)
Imports the content of the fields from the fdf file and put them into the new pdf.
Form form = new Form("PdfForm.pdf", "PdfForm_imported.pdf");
form.importFdf(new FileInputStream("data.fdf"));
form.save();
public void exportFdf(OutputStream outputFdfStream)
Exports the content of the fields of the pdf into the fdf stream.
Form form = new Form("PdfForm.pdf");
OutputStream stream = new FileOutputStream("export.fdf");
form.exportFdf(stream);
stream.close();
public void importXml(String inputXml)
Imports the content of the fields from the xml file and put them into the new pdf.
Form form = new Form("PdfForm.pdf");
form.importXml("import.xml");
form.save( "Form_Imported.pdf");
inputXml - Stream from which XML for import is read.public void importXml(InputStream inputXmlStream)
Imports the content of the fields from the xml file and put them into the new pdf.
Form form = new Form("PdfForm.pdf");
InputStream fs = new FileInputStream("import.xml");
form.importXml(fs);
form.save("Form_Imported.pdf");
public void exportXml(OutputStream outputXmlStream)
Exports the content of the fields of the pdf into the xml stream. The button field's value will not be exported.
Form form = new Form("PdfForm.pdf"));
OutputStream fs = new FileOutputStream("export.xml");
form.exportXml(fs);
fs.close();
public void extractXfaData(OutputStream outputXmlStream)
Extracts XFA data packet
outputXmlStream - Stream where XML data will be stored.public void setXfaData(InputStream inputXmlStream)
Replaces XFA data with specified data packet. Data packet may be extracted using ExtractXfaData.
inputXmlStream - Stream where XML is stored.public void importXfdf(InputStream inputXfdfStream)
Imports the content of the fields from the xfdf(xml) file and put them into the new pdf.
Form form = new Form("PdfForm.pdf", "Form_ImportXfdf.pdf");
InputStream fs = new FileInputStream("export_old.xfdf");
form.importXfdf(fs);
fs.close();
form.save();
importXfdf in interface IForminputXfdfStream - The input xfdf(xml) stream.public void exportXfdf(OutputStream outputXfdfStream)
Exports the content of the fields of the pdf into the xml stream. The button field's value will not be exported.
Form form = new Form("PdfForm.pdf");
FileInputStream fs = new FileInputStream("export.xfdf", FileMode.Create, FileAccess.Write);
form.exportXfdf(fs);
fs.close();
exportXfdf in interface IFormoutputXfdfStream - The output xml stream.public void fillField(String fieldName, String[] fieldValues)
Fill a field with multiple selections.Note: only for AcroForm List Box Field.
Form form = new com.aspose.pdf.Form("PdfForm.pdf", "Form_Updated.pdf");
form.fillField("ListBox1", new String[] { "Three", "One" });
form.save();
public void renameField(String fieldName, String newFieldName)
Renames a field. Either AcroForm field or XFA field is OK.
Form form = new Form("PdfForm.pdf", "PdfFormUpdated.pdf");
form.renameField("field", "field1");
form.save();
renameField in interface IFormfieldName - the old field namenewFieldName - the new field namepublic String getRichText(String fieldName)
Get a Rich Text field's value, including the formattinf information of every character.
Form form = new Form("PdfForm.pdf");
System.out.println(form.getRichText("txtDescriptionRTF"));
getRichText in interface IFormfieldName - The fully qualified field name of the Rich Text field.public SubmitFormFlag getSubmitFlags(String fieldName)
Returns the submit button's submission flags
Form form = new Form("PdfForm.pdf");
System.out.println( ( form.getSubmitFlags("btnSubmit") | SubmitFormFlag.Xfdf != 0) ? " XFDF" : " ");
/// System.out.println( ( form.getSubmitFlags("btnSubmit") | SubmitFormFlag.Fdf != 0) ? " FDF" : " ");
System.out.println( ( form.getSubmitFlags("btnSubmit") | SubmitFormFlag.Pdf != 0) ? " PDF" : " ");
getSubmitFlags in interface IFormfieldName - The qualified field name.SubmitFormFlagpublic FieldType getFieldType(String fieldName)
Returns type of field.
Form form = new Form("PdfForm.pdf");
if (form.getFieldType("textField") == FieldType.Text)
{
System.out.println("_Type of field is text");
}
getFieldType in interface IFormfieldName - Field name.FieldTypepublic boolean isRequiredField(String fieldName)
Determines whether field is required or not.
fieldName - The name of field.public int getFieldFlag(String fieldName)
Returns flags of the field.
Form form = new Form("PdfForm.pdf");
if (form.getFieldFlag("textField") == ProptyFlag.ReadOnly)
{
System.out.println("Field is read-only");
}
getFieldFlag in interface IFormfieldName - Field namePropertyFlagpublic void fillImageField(String fieldName, String imageFileName)
Pastes an image onto the existing button field as its appearance according to its fully qualified field name.
Form form = new Form("PdfForm.pdf", "PdfForm_filled.pdf");
form.fillImageField("fieldName", "file.jpg");
form.save();
fillImageField in interface IFormfieldName - The fully qualified field name of the image button field.imageFileName - The path of the image file, relative and absolute are both ok.public void fillImageField(String fieldName, InputStream imageStream)
Overloads function of FillImageField. The input is a image stream.
Form form = new Form("PdfForm.pdf", "PdfForm_filled.pdf");
form.fillImageField("fieldName", new FileInputStream("file.jpg", FileMode.Open, FileAccess.Read));
fillImageField in interface IFormfieldName - The fully qualified field name.imageStream - The image's stream.public void importXml(InputStream inputXmlStream, boolean IgnoreFormTemplateChanges)
Imports the content of the fields from the xml file and put them into the new pdf.
public boolean fillField(String fieldName, String value, boolean fitFontSize)
Fills field with specified value.
public ContentDisposition getContentDisposition()
Getshow content will be stored when result of operation is stored into HttpResponse object. Possible value: inline / attachment. Default: inline.
getContentDisposition in interface IFormContentDispositionpublic void setContentDisposition(ContentDisposition value)
Sets how content will be stored when result of operation is stored into HttpResponse object. Possible value: inline / attachment. Default: inline.
setContentDisposition in interface IFormvalue - ContentDisposition elementContentDispositionpublic SaveOptions getSaveOptions()
Gets or sets save options when result is stored as HttpResponse. Default value: PdfSaveOptions.
getSaveOptions in interface IFormpublic void setSaveOptions(SaveOptions value)
Gets or sets save options when result is stored as HttpResponse. Default value: PdfSaveOptions.
setSaveOptions in interface IFormvalue - SaveOptions objectpublic String getAttachmentName()
Gets name of attachment when result of operation is stored into HttpResponse objects as attachment.
getAttachmentName in interface IFormpublic void setAttachmentName(String value)
Sets name of attachment when result of operation is stored into HttpResponse objects as attachment.
setAttachmentName in interface IFormvalue - String objectCopyright © 2025 Aspose. All Rights Reserved.