com.adobe.convertpdf.docservice
Class ConvertPdfServiceImpl

java.lang.Object
  extended by com.adobe.convertpdf.docservice.ConvertPdfServiceImpl
All Implemented Interfaces:
ConvertPdfService

public class ConvertPdfServiceImpl
extends java.lang.Object
implements ConvertPdfService

This class exposes the submit and getResult APIs as doc service operations.


Field Summary
 
Fields inherited from interface com.adobe.convertpdf.docservice.ConvertPdfService
DRAW_SMOOTH_IMAGE, DRAW_SMOOTH_LINE_ART, DRAW_SMOOTH_TEXT, THRESHOLD_RESOLUTION_FOR_SMOOTHING
 
Constructor Summary
ConvertPdfServiceImpl()
           
 
Method Summary
 int getThresholdResolutionForSmoothing()
          Returns the Threshold Resolution For Smoothing (in dpi).
 TransactionTemplate getTransactionTemplate()
           
 int getTransactionTimeOut()
           
 java.lang.String getTransactionType()
           
 boolean isDrawSmoothImage()
          Returns the boolean flag that decides whether to apply smoothing functions to Images.
 boolean isDrawSmoothLineArt()
          Returns the boolean flag that decides whether to apply smoothing functions to LineArt.
 boolean isDrawSmoothText()
          Returns the boolean flag that decides whether to apply smoothing functions to text.
 void setDrawSmoothImage(boolean drawSmoothImage)
          Sets the boolean flag that decides whether to apply smoothing functions to Images.
 void setDrawSmoothLineArt(boolean drawSmoothLineArt)
          Sets the boolean flag that decides whether to apply smoothing functions to LineArt.
 void setDrawSmoothText(boolean drawSmoothText)
          Sets the boolean flag that decides whether to apply smoothing functions to text.
 void setThresholdResolutionForSmoothing(int thresholdResolutionForSmoothing)
          Sets the Threshold Resolution For Smoothing (in dpi).
 void setTransactionTemplate(TransactionTemplate aTemplate)
           
 void setTransactionTimeOut(int transactionTimeOut)
           
 void setTransactionType(java.lang.String transactionType)
           
 Document toImage(Document inPdfDoc, ToImageOptionsSpec toImageOptionsSpec)
          Deprecated.  
 java.util.List toImage2(Document inPdfDoc, ToImageOptionsSpec toImageOptionsSpec)
          This method converts the PDF document to List of Images.
 java.util.List toImage2InTxn(Document inPdfDoc, ToImageOptionsSpec toImageOptionsSpec, java.lang.String archive)
           
 Document toPS(Document inPdfDoc, PSLevel psLevel)
          Deprecated.  
 Document toPS2(Document inPdfDoc, ToPSOptionsSpec toPSOptionsSpec)
          This method converts the given Flat PDF file to PostScript format using the options specified in the option spec
 java.util.List toSWF(Document inPdfDoc, ToSWFOptionsSpec toSWFOptionsSpec)
          This method converts a PDF document to a List of SWF documents using the options specified in the option spec
 void unzipArchive(Document inZipDoc, java.lang.String destDir)
          Deprecated.  
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConvertPdfServiceImpl

public ConvertPdfServiceImpl()
Method Detail

getThresholdResolutionForSmoothing

public int getThresholdResolutionForSmoothing()
Description copied from interface: ConvertPdfService
Returns the Threshold Resolution For Smoothing (in dpi). Below this resolution the smoothing functions are applied.

Specified by:
getThresholdResolutionForSmoothing in interface ConvertPdfService
Returns:
int

setThresholdResolutionForSmoothing

public void setThresholdResolutionForSmoothing(int thresholdResolutionForSmoothing)
Description copied from interface: ConvertPdfService
Sets the Threshold Resolution For Smoothing (in dpi). This parameter would only be used in toImage and toImage2 APIs. Below this resolution the smoothing functions are applied.

Specified by:
setThresholdResolutionForSmoothing in interface ConvertPdfService

isDrawSmoothText

public boolean isDrawSmoothText()
Description copied from interface: ConvertPdfService
Returns the boolean flag that decides whether to apply smoothing functions to text. This parameter would only be used in toImage and toImage2 APIs. This flag would be used only when the resolution set in toImageOptionsSpec is less than the Threshold Resolution For Smoothing (in dpi).

Specified by:
isDrawSmoothText in interface ConvertPdfService
Returns:
boolean

setDrawSmoothText

public void setDrawSmoothText(boolean drawSmoothText)
Description copied from interface: ConvertPdfService
Sets the boolean flag that decides whether to apply smoothing functions to text. This parameter would only be used in toImage and toImage2 APIs. This flag would be used only when the resolution set in toImageOptionsSpec is less than the Threshold Resolution For Smoothing (in dpi).

Specified by:
setDrawSmoothText in interface ConvertPdfService

isDrawSmoothLineArt

public boolean isDrawSmoothLineArt()
Description copied from interface: ConvertPdfService
Returns the boolean flag that decides whether to apply smoothing functions to LineArt. This parameter would only be used in toImage and toImage2 APIs. This flag would be used only when the resolution set in toImageOptionsSpec is less than the Threshold Resolution For Smoothing (in dpi).

Specified by:
isDrawSmoothLineArt in interface ConvertPdfService
Returns:
boolean

setDrawSmoothLineArt

public void setDrawSmoothLineArt(boolean drawSmoothLineArt)
Description copied from interface: ConvertPdfService
Sets the boolean flag that decides whether to apply smoothing functions to LineArt. This parameter would only be used in toImage and toImage2 APIs. This flag would be used only when the resolution set in toImageOptionsSpec is less than the Threshold Resolution For Smoothing (in dpi).

Specified by:
setDrawSmoothLineArt in interface ConvertPdfService

isDrawSmoothImage

public boolean isDrawSmoothImage()
Description copied from interface: ConvertPdfService
Returns the boolean flag that decides whether to apply smoothing functions to Images. This parameter would only be used in toImage and toImage2 APIs. This flag would be used only when the resolution set in toImageOptionsSpec is less than the Threshold Resolution For Smoothing (in dpi).

Specified by:
isDrawSmoothImage in interface ConvertPdfService
Returns:
boolean

setDrawSmoothImage

public void setDrawSmoothImage(boolean drawSmoothImage)
Description copied from interface: ConvertPdfService
Sets the boolean flag that decides whether to apply smoothing functions to Images. This parameter would only be used in toImage and toImage2 APIs. This flag would be used only when the resolution set in toImageOptionsSpec is less than the Threshold Resolution For Smoothing (in dpi).

Specified by:
setDrawSmoothImage in interface ConvertPdfService

setTransactionTemplate

public void setTransactionTemplate(TransactionTemplate aTemplate)

getTransactionTemplate

public TransactionTemplate getTransactionTemplate()

toPS

public Document toPS(Document inPdfDoc,
                     PSLevel psLevel)
              throws ConvertPdfException
Deprecated. 

This method converts the given Flat PDF file to PostScript format using the version indicated by psLevel.

Specified by:
toPS in interface ConvertPdfService
Parameters:
sourcePdf - Document object for the source PDF
psLevel - The version level for the output PostScript
Returns:
Document The document object for the output PostScript file.
Throws:
ConvertPdfException

toPS2

public Document toPS2(Document inPdfDoc,
                      ToPSOptionsSpec toPSOptionsSpec)
               throws ConvertPdfException
This method converts the given Flat PDF file to PostScript format using the options specified in the option spec

Specified by:
toPS2 in interface ConvertPdfService
Parameters:
sourcePdf - Document object for the source PDF
toPSOptionsSpec - ToPSOptionsSpec Option spec for toPS
Returns:
Document The document object for the output PostScript file.
Throws:
ConvertPdfException

toImage

public Document toImage(Document inPdfDoc,
                        ToImageOptionsSpec toImageOptionsSpec)
                 throws ConvertPdfException
Deprecated. 

This method converts the PDF document to Image. The resulting image files are zipped and returned as a Document. Supported image formats are JPEG, JPEG2K, PNG and TIFF.

Specified by:
toImage in interface ConvertPdfService
Parameters:
inPdfDoc - - PDF document to be converted to Image
toImageOptionsSpec - - Various options for image conversions including image format.
Returns:
Document The document object for the output Image files archived in ZIP format.
Throws:
ConvertPdfException

toImage2

public java.util.List toImage2(Document inPdfDoc,
                               ToImageOptionsSpec toImageOptionsSpec)
                        throws ConvertPdfException
This method converts the PDF document to List of Images. Supported image formats are JPEG, JPEG2K, PNG and TIFF.

Specified by:
toImage2 in interface ConvertPdfService
Parameters:
inPdfDoc - - PDF document to be converted to Image
toImageOptionsSpec - - Various options for image conversions including image format.
Returns:
List the list of Document objects containing the images.
Throws:
ConvertPdfException

toImage2InTxn

public java.util.List toImage2InTxn(Document inPdfDoc,
                                    ToImageOptionsSpec toImageOptionsSpec,
                                    java.lang.String archive)
                             throws ConvertPdfException
Throws:
ConvertPdfException

unzipArchive

public void unzipArchive(Document inZipDoc,
                         java.lang.String destDir)
                  throws ConvertPdfException
Deprecated. 

This method unzips the archive to the destination directory.

Specified by:
unzipArchive in interface ConvertPdfService
Parameters:
inZipDoc -
destDir -
Throws:
ConvertPdfException

getTransactionTimeOut

public int getTransactionTimeOut()
Returns:
Returns the transactionTimeOut.

setTransactionTimeOut

public void setTransactionTimeOut(int transactionTimeOut)
Parameters:
transactionTimeOut - The transactionTimeOut to set.

getTransactionType

public java.lang.String getTransactionType()
Returns:
Returns the transactionType.

setTransactionType

public void setTransactionType(java.lang.String transactionType)
Parameters:
transactionType - The transactionType to set.

toSWF

public java.util.List toSWF(Document inPdfDoc,
                            ToSWFOptionsSpec toSWFOptionsSpec)
                     throws ConvertPdfException
This method converts a PDF document to a List of SWF documents using the options specified in the option spec

Specified by:
toSWF in interface ConvertPdfService
Parameters:
inPdfDoc - Document object for the source PDF
toSWFOptionsSpec - ToSWFOptionsSpec option spec
Returns:
List, the list of SWF Document objects.
Throws:
ConvertPdfException