Blog : Interface IPDFDocument

Interface IPDFDocument


--------------------------------------------------------------------------------

public interface IPDFDocumentIPDFDocument represents a PDF document. IPDFDocument can be used and manpulated to get the PDF byte array, to get the data contained within the document, to get the signatures and certifications contained within the document and so on and so forth.



Since:
NYC
See Also:
IPDFDocumentHandler

--------------------------------------------------------------------------------


Method Summary
 IPDFAttachment[] getAllAttachments()
  Gets the attachments associated with the PDF Document
 IPDFAttachment[] getAttachment(String name)
  Get the attachment specified by attachment ID
 IPDFAttachmentList getAttachmentList()
  Gets the attachment list associated with the PDF Document
 IPDFCertificate getCertification()
  Method getCertification returns an object of type IWDPDFDocumentCertificate if there is a certificate applied on the PDF document.
 InputStream getData()
  Method getData returns the data stream contained within the PDF document.
 String getErrorMessage()
   
 byte[] getErrorPDF()
  Method getErrorPDF returns the pdf byte array to the application if the pdf is contained in the response container.
 InputStream getErrorPDFAsStream()
  Method getErrorPDFStream returns the pdf byte stream to the application if the pdf is contained in the response container.
 IPDFJobProfileResponse getJobProfileResponse()
  Get the jobProfile response associated with the pdf document
 byte[] getPDF()
  Method getPDF returns the pdf byte array to the application.
 InputStream getPDFAsStream()
  Method getPDFAsStream returns the pdf as an InputStream to the application.
 IPDLDocument getPDLDocument()
   
 byte[] getSchema()
  Method getSchema returns the template(XDP) schema byte array to the application.
 IPDFSignature[] getSignature()
  Method getSignature returns an array of IPDFSignature attached with the PDF document.
 boolean isErrorPDF()
   
 

Method Detail
getPDFAsStream
InputStream getPDFAsStream()Method getPDFAsStream returns the pdf as an InputStream to the application.

Returns:
pdfStream : InputStream

--------------------------------------------------------------------------------
getPDF
byte[] getPDF()Method getPDF returns the pdf byte array to the application.

Returns:
pdf : byte[]

--------------------------------------------------------------------------------
getData
InputStream getData()Method getData returns the data stream contained within the PDF document. Returns null if the document does not contain any data.

Returns:
data : InputStream

--------------------------------------------------------------------------------
getSignature
IPDFSignature[] getSignature()Method getSignature returns an array of IPDFSignature attached with the PDF document. An instance of IPDFSignature represents a signature field on the document. That means, if there are n number of signature fields on the document, then there will be n number of intsance of type IPDFSignature in the array. Such instances of IPDFSignature can then be manipulated by the application to find out whether the required signature field has been signed or not. Returns null if there is no signature field on the document. IPDFSignature[] signatures = pdfDocument.getSignature(); for(...){ ... ... if(signatures[i].isValid() && signatures[i].getField().equals("SignatureField2")){ ... ... }else{ ... ... } }

Returns:
signatures : IPDFSignature[]
See Also:
IPDFSignature

--------------------------------------------------------------------------------
getCertification
IPDFCertificate getCertification()Method getCertification returns an object of type IWDPDFDocumentCertificate if there is a certificate applied on the PDF document. This object can then be used to check the status of the certification on the PDF document. Remember, only one certificate can be applied on a PDF document at any point in time. But, multiple digital signatures can be applied on the document.

Returns:
certification : IPDFCertificate
See Also:
PDFCertificateStatus, IPDFCertificate

--------------------------------------------------------------------------------
isErrorPDF
boolean isErrorPDF()Returns:
isErrorPDF

--------------------------------------------------------------------------------
getErrorPDF
byte[] getErrorPDF()Method getErrorPDF returns the pdf byte array to the application if the pdf is contained in the response container.

Returns:
byte[]

--------------------------------------------------------------------------------
getErrorPDFAsStream
InputStream getErrorPDFAsStream()Method getErrorPDFStream returns the pdf byte stream to the application if the pdf is contained in the response container.

Returns:
InputStream

--------------------------------------------------------------------------------
getErrorMessage
String getErrorMessage()Returns:
errorMessag

--------------------------------------------------------------------------------
getPDLDocument
IPDLDocument getPDLDocument()Returns:
pdl : IPDLDocument

--------------------------------------------------------------------------------
getAttachmentList
IPDFAttachmentList getAttachmentList()Gets the attachment list associated with the PDF Document

Returns:
Attachment List : IPDFAttachmentList

--------------------------------------------------------------------------------
getAllAttachments
IPDFAttachment[] getAllAttachments()Gets the attachments associated with the PDF Document

Returns:
PDF Document Attachments : IPDFAttachment[]

--------------------------------------------------------------------------------
getAttachment
IPDFAttachment[] getAttachment(String name)Get the attachment specified by attachment ID

Parameters:
name - of the attachment
Returns:
PDF Document Attachment : IPDFAttachment

--------------------------------------------------------------------------------
getJobProfileResponse
IPDFJobProfileResponse getJobProfileResponse()
  throws PDFJobProfileExceptionGet the jobProfile response associated with the pdf document

Returns:
jobProfileResponse The job profile response that contains available job profile items. If job profile is not configured on the Adobe Document Services, the method throws PDFJobProfileException.
Throws:
PDFJobProfileException

--------------------------------------------------------------------------------
getSchema
byte[] getSchema()Method getSchema returns the template(XDP) schema byte array to the application.

Returns:
schema : byte[]
Access Rights  

This class can be accessed from:
SC  DC  Public Part  ACH  
[sap.com] FRAMEWORK  [sap.com] tc/pdf/object  -  BC-WD-JAV  
[sap.com] FRAMEWORK  [sap.com] tc/pdf/object  public_api  BC-WD-JAV  
[sap.com] FRAMEWORK  [sap.com] tc/pdf/object  restricted_api  BC-WD-JAV