PDF Driver & Adobe

Hi,

I’m busy to do a correction on a function to save a document as PDF (CDInt automation) and then send it by mail.

But after the "save " on the print part, Adobe open’s automatically and then the PDF could not be save as attachment with the mail.

I solved it by copy the first “normal” attachment file to another location and then attach it to my mail.

Ok it’s working, but Adobe stay open with the first file why ???

Problem with MAPI fct, with CDI method ??

Could someone help me ?

Regards,

Most probably a setup issue of the “Printer Driver”, there should be the option to “Show PDF after creation” or similar. This is most probably a setting stored in the windows registry. So either you change that on the printer driver using the properties window of the printer or you change it by code manipulating the registry entry directly.

Not 100% sure what the problem is?

Is it that the email is sent before the attachment is complete?

If so I had a smiliar problem, I had to force the Navision to yield, it was doing a post batch and emailing out each Invoice. Problem was it would delete the file before it got to attaching the email and sending it. So I just put a yeild into the system to ensure PDF creation was completed before focus returned to the Navision Code.

Thomas,

I’ve look in details the “Printer Driver” properties, but don’t see anything.

Yes maybee a setup in the registry but wich one and how can I change this ?


TonyH

Yes idd, the code that create the mail (smtp) attach the file that was just created with CDI automation.

But meanwhile, Adobe is open automatically (withtout visible code) and as long as Adobe is open the file could not be attached, but if I take a copy (durint Adobe open), and attach this file it’s working.

My main question is why Adobe open’s automatically ???

I don’t see something in the CDI methods or SMTP methods that allow this ?

It was just a wild guess based on a PDF Printer WE are using for such purposes. There we have this setting. Maybe you should contact the developers of the printer driver.

Actually what happens when you create a PDF from let’s say Word or Excel using the same printer ? Does it open Adobe as well ? And what Adobe is being opened ? Just the reader or some other Adobe program ?

I think its the setting soemwhere in the registry of the key. I recently did upgrade my Adobe to Adobe 6.0.0 and it does teh same thing … eevrytime I create a PDF it opens up the adobe file which I do not want… and I checked all the settings and nothings changed anywhere ofcourse I haven’t checked teh registry so could be some change there…have you tested it with some older version that might confirm that its teh issue with adobe 6 only.

Thanks

In the printer properties, Printing Preferences/Adobe PDF Settings, you should have View Adobe PDF results.

Try deselecting that.

That worked for me… Thanks Colin!!