2 Replies Latest reply on Jul 8, 2008 3:17 PM by (vijaypeddareddy)

    What is the use for the input file name?

      Some of Livecycle function need inputfilename besides the document object, such as following. The document object already give as a input parameter, why still need inputfilename? Actually I use some other dummy name that is different from the physical file name, it still works. So just do not get it why need input file name parameter in some Adobe LiveCycle class functions?

      CreatePDFResult createPDF(Document inDoc, String inputFileName, String pdfSettings, String securitySettings, Document inSettingsDoc, Document inXMPDoc)

      Thanks for your help,
      P
        • 1. Re: What is the use for the input file name?
          pguerett Level 6
          That filename parameter is used to write informative information to the log. Without a filename it would be a very cryptic message.
          • 2. Re: What is the use for the input file name?
            Hi,

            Please help me.

            My requirement is to develop a standalone java program to convert Word documents to PDFs using Adoble LC ES.

            I found the code from the Adobe LC ES documentation. Please help me what's wrong in the code.

            I don't understand what i'm missing in the code...The "test.doc" file
            is there in the given location with proper data and Document object is not "NULL". Program is able to connect to Adobe LC Server. No issues with connection. But why the error ??

            Code & exception are below :

            CODE:
            -----------
            import java.io.File;
            import java.util.Properties;
            import com.adobe.idp.Document;
            import com.adobe.idp.dsc.clientsdk.ServiceClientFactory;
            import com.adobe.livecycle.generatepdf.client.CreatePDFResult;
            import
            com.adobe.livecycle.generatepdf.client.GeneratePdfServiceClient;

            public class GeneratePDFFromNativeFiles {

            public static void main(String[] args)
            {
            Properties ConnectionPropsForSOAP = new Properties();

            ConnectionPropsForSOAP.setProperty("DSC_DEFAULT_SOAP_ENDPOINT",
            "http://workspace-d.web.abbott.com:8080/soap/services/
            ConvertAllFileTypesToPDF?wsdl");

            ConnectionPropsForSOAP.setProperty("DSC_TRANSPORT_PROTOCOL", "SOAP");
            ConnectionPropsForSOAP.setProperty("DSC_SERVER_TYPE", "JBoss");
            ConnectionPropsForSOAP.setProperty("DSC_CREDENTIAL_USERNAME",
            "epaspdfgen");
            ConnectionPropsForSOAP.setProperty("DSC_CREDENTIAL_PASSWORD",
            "epaspdf1");

            ServiceClientFactory factory =
            ServiceClientFactory.createInstance(ConnectionPropsForSOAP);
            try{
            String currentDirectory = System.getProperty("user.dir");

            String sourceDocPath="/test.doc";
            String resultDocPath ="/bin/arg/util/simpleFTP/test.pdf";

            String inputFilePath = currentDirectory+sourceDocPath;

            File file = new File(inputFilePath);

            String adobePDFSettings = "Standard";
            String securitySettings = "No Security";
            String fileTypeSettings = "Standard";

            GeneratePdfServiceClient gps = new
            GeneratePdfServiceClient(factory);

            Document inputDoc = new Document(file,true);

            CreatePDFResult docResult = gps.createPDF(inputDoc, inputFilePath,
            fileTypeSettings, adobePDFSettings, securitySettings, null, null);

            Document createdDocument = docResult.getCreatedDocument();
            createdDocument.copyToFile(new File(currentDirectory
            +resultDocPath));

            }

            catch (Exception e) {
            e.printStackTrace();
            System.out.println("Error OCCURRED: " + e.getMessage());

            }
            }
            }

            EXCEPTION:
            --------------------

            ALC-DSC-000-000: com.adobe.idp.dsc.DSCRuntimeException: Internal
            error.
            at
            com.adobe.idp.dsc.provider.impl.soap.axis.sdk.SoapAxisDispatcher.throwExceptionHandler(So apAxisDispatcher.java:
            207)
            at
            com.adobe.idp.dsc.provider.impl.soap.axis.sdk.SoapAxisDispatcher.doSend(SoapAxisDispatche r.java:
            125)
            at
            com.adobe.idp.dsc.provider.impl.base.AbstractMessageDispatcher.send(AbstractMessageDispat cher.java:
            57)
            at
            com.adobe.idp.dsc.clientsdk.ServiceClient.invoke(ServiceClient.java:
            208)
            at
            com.adobe.livecycle.generatepdf.client.GeneratePdfServiceClient.createPDF(GeneratePdfServ iceClient.java:
            172)
            at
            arg.util.simpleFTP.GeneratePDFFromNativeFiles.main(GeneratePDFFromNativeFiles.java:
            73)
            Caused by: ALC-DSC-002-000:
            com.adobe.idp.dsc.RequiredParameterException: Parameter: inputDocument
            is required.
            at
            org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:
            221)
            at
            org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:
            128)
            at
            org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:
            1087)
            at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
            Source)
            at
            org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown
            Source)
            at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl
            $FragmentContentDispatcher.dispatch(Unknown Source)
            at
            org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
            Source)
            at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
            at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
            at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
            at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
            at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
            Source)
            at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
            at
            org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:
            227)
            at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
            at org.apache.axis.Message.getSOAPEnvelope(Message.java:424)
            at
            org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:
            62)
            at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
            at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
            at org.apache.axis.client.Call.invoke(Call.java:2748)
            at org.apache.axis.client.Call.invoke(Call.java:2424)
            at org.apache.axis.client.Call.invoke(Call.java:2347)
            at org.apache.axis.client.Call.invoke(Call.java:1804)
            at
            com.adobe.idp.dsc.provider.impl.soap.axis.sdk.SoapAxisDispatcher.doSend(SoapAxisDispatche r.java:
            123

            Please help me.

            Thanks a lot.
            VJ.