Hello,
I am recieving ALC-PDG-052-018 when trying to convert an HTML page to PDF. I have taken the example from adobe samples and it is giving the error below-
" Caused by: ALC-PDG-52018-000: com.adobe.livecycle.generatepdf.client.ConversionException: ALC-PDG-052-018-Connection to host cannot be resolved(URL does not exist).; nested exception is: \n\tALC-PDG-52018-000: com.adobe.livecycle.generatepdf.client.ConversionException: ALC-PDG-052-018-Connection to host cannot be resolved(URL does not exist)."} | System.Exception {System.ServiceModel.FaultException} |
Does anyone have an idea of how to fix it?
try
{
//Create a GeneratePDFService object
ServiceReference1.GeneratePDFServiceClient pdfGenClient = new ServiceReference1.GeneratePDFServiceClient();
//// Provide authentication credentials to the service
pdfGenClient.Endpoint.Address = new System.ServiceModel.EndpointAddress("http://localhost/soap/services/GeneratePDFService?wsdl&lc_version=9.0. 0&blob=mtom");
////Enable BASIC HTTP authentication
BasicHttpBinding b = (BasicHttpBinding)pdfGenClient.Endpoint.Binding;
b.MessageEncoding = WSMessageEncoding.Mtom;
pdfGenClient.ClientCredentials.UserName.UserName = "adobetest";
pdfGenClient.ClientCredentials.UserName.Password = "adobetest";
b.Security.Transport.ClientCredentialType = HttpClientCredentialType.Basic;
b.Security.Mode = BasicHttpSecurityMode.TransportCredentialOnly;
b.MaxReceivedMessageSize = 2000000;
b.MaxBufferSize = 2000000;
b.ReaderQuotas.MaxArrayLength = 2000000;
//Get an HTML document to convert to a PDF document a
String inputFileName = "http://www.adobe.com";
String securitySettings = "No Security";
String fileTypeSettings = "Standard";
ServiceReference1.BLOB outDoc = new ServiceReference1.BLOB();
//Convert the Word file to a PDF document
pdfGenClient.HtmlToPDF2(
inputFileName,
fileTypeSettings,
securitySettings,
null,
null,
out outDoc);
//Save the converted PDF document
byte[] outByteArray = outDoc.MTOM;
//Create a new file to store result data
string FILE_NAME = "C:\\Adobe\\AdobeHTML.pdf";
FileStream fs2 = new FileStream(FILE_NAME, FileMode.OpenOrCreate);
//Create a BinaryWriter object
BinaryWriter w = new BinaryWriter(fs2);
w.Write(outByteArray);
w.Close();
fs2.Close();
}
catch (Exception ee)
{
Console.WriteLine(ee.Message);
}
Thanks,
Swetha