Expand my Community achievements bar.

Compress/Optimize Pdf using Adobe LiveCycle Pdf Generator in my c# console application

Avatar

Former Community Member

Hello,

I am creating an console application in C# that will optimize / compress pdf which contain high defination images. I have the pdf which have size above 500 MB i need to compress that kind of pdf files. I have seen the option to save as optimize pdf in Adobe professional software but i want to do that programmatically in my c# application.

Now I have asked this question in Acrobat SDK Forums as well and there they have told me to check Adobe LiveCycle Software Here is the link for that : http://forums.adobe.com/message/5468065.

Now If i want to go with Adobe Livecycle my question is.

  • Can I call or use adobeLivecycle pdf optimizer libraries in my c# application.

Let me know what i can do to integrate in my c# application

1 Reply

Avatar

Employee

The API call is here.

http://help.adobe.com/en_US/livecycle/9.0/programLC/javadoc/index.html

optimizePDF

public OptimizePDFResult optimizePDF(Document inputDocument, String fileTypeSettings, Document inSettingsDoc) throws ConversionException, InvalidParameterException, FileFormatNotSupportedException
Optimizes the input PDF document by reducing its size. This method also converts the PDF document to the PDF version specified in the optimization parameters. This method supports the same optimization settings as Adobe Acrobat.

Parameters:
inDoc - This mandatory parameter contains an instance of the Document whose content is to be optimized. For this object, it is recommended that you either use the appropriate Document constructor if you have access to the file, or that you use the com.adobe.idp.Document.setAttribute() method if you only have access to the stream.
fileTypeSettings - Name of a file type settings instance that is defined on the LiveCycle server. The LiveCycle Administration Console window for Generate PDF lets you view the currently defined file type settings. It also lets you create custom file type settings. If the inSettingsDoc parameter specifies a non-NULL value, this parameter is ignored. If this parameter and the inSettingsDoc parameter are both null, this method uses the default file type settings instance that is defined on the LiveCycle server.
inSettingsDoc - file2pdf-settings XML file that contains file type settings to use for optimization, including the file type settings used by this method. For information about this file, see the description for the createPDF2() method.
Returns:
An object that exposes a method for getting the optimized PDF document.
Throws:
ConversionException 
InvalidParameterException 
Parameters:
inDoc - This mandatory parameter contains an instance of the Document whose content is to be optimized. For this object, it is recommended that you either use the appropriate Document constructor if you have access to the file, or that you use the com.adobe.idp.Document.setAttribute() method if you only have access to the stream.
fileTypeSettings - Name of a file type settings instance that is defined on the LiveCycle server. The LiveCycle Administration Console window for Generate PDF lets you view the currently defined file type settings. It also lets you create custom file type settings. If the inSettingsDoc parameter specifies a non-NULL value, this parameter is ignored. If this parameter and the inSettingsDoc parameter are both null, this method uses the default file type settings instance that is defined on the LiveCycle server.
inSettingsDoc - file2pdf-settings XML file that contains file type settings to use for optimization, including the file type settings used by this method. For information about this file, see the description for the createPDF2() method.
Returns:
An object that exposes a method for getting the optimized PDF document.
Throws:
ConversionException 
InvalidParameterException 
Parameters:
inDoc - This mandatory parameter contains an instance of the Document whose content is to be optimized. For this object, it is recommended that you either use the appropriate Document constructor if you have access to the file, or that you use the com.adobe.idp.Document.setAttribute() method if you only have access to the stream.
fileTypeSettings - Name of a file type settings instance that is defined on the LiveCycle server. The LiveCycle Administration Console window for Generate PDF lets you view the currently defined file type settings. It also lets you create custom file type settings. If the inSettingsDoc parameter specifies a non-NULL value, this parameter is ignored. If this parameter and the inSettingsDoc parameter are both null, this method uses the default file type settings instance that is defined on the LiveCycle server.
inSettingsDoc - file2pdf-settings XML file that contains file type settings to use for optimization, including the file type settings used by this method. For information about this file, see the description for the createPDF2() method.
Returns:
An object that exposes a method for getting the optimized PDF document.
Throws:
ConversionException 
InvalidParameterException 
FileFormatNotSupportedException



You should look here at some of the Web Service API calls for .Net. to see how to follow the framework of connecting via SOAP from .Net

http://help.adobe.com/en_US/livecycle/10.0/ProgramLC/WS624e3cba99b79e12e69a9941333732bac8-7749.html