I am using the below method to convert excel to pdf. I am getting the pdf as a output. But when i open the output pdf i am getting the error,
"Acrobat could not open 'report.pdf' because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly decoded). To create an Adobe PDF document, go to the source application. Then print the document to pdf".
Previously in my system i had Adobe 6.0 and all worked perfectly, but now i removed and installed Adobe 7.0 i am getting the above error. Where am i going wrong?
my @thing = $sheet->PrintOut({
Copies => 1,
PrintToFile => 'True',
ActivePrinter => "Adobe PDF",#version 7
# ActivePrinter => "Acrobat PDFWriter",#version 6
PrToFileName => "C:\\Report.pdf",
#Collate => 1,
});
Thanks for your reply. Yes, when i do manually it converts properly and not getting any error while opening. Only when i do this through perl, i am getting error. Also if i didnt give the path in the Printout method, it saves the pdf file in C:/Program Files/Outlook express. I didnt changed my current directory to that. Why it is happening like that. I think that might be the reason.
perlmonks.org content © perlmonks.org and Anonymous Monk, JamesNC
prlmnks.org © 2006 edmund von der burg (eccles & toad)
v 0.03