Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
IE form control content to PDF
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
IE form control content to PDF
Divers
Thread ID:
01676861
Message ID:
01676861
Vues:
41
On an end-user 'email message' form I have an IE object which contains mail-merged composed message text in html format.

Because recipients are apparently changing the content of the received message, I am trying to programmatically print the message contents of the IE control directly to a PDF file and then (redundantly) attach that generated PDF as an attachment to the email message (which would then be sent back and forth between the parties via an electronic signature service).

Currently I can print the contents which invokes the printer selection dialogue box. But i was hoping to pass a PDF printer name (and a file name) to the "execCommand" command. But no luck so far. I cant avoid the dialogue box, and I cannot set the output file type. But it will save to an .html file in the end.

At this point, the user would get a printer dialogue box, then they would have to select a PDF printer driver, then specify an output filename, then complete the PDF generation, then test for file existence, ...

Has anyone automated this IE-content-to-pdf process?
Or is there an ActiveX control that supports this?

There is an existing and somewhat comparable feature available where an MSWord session is spun up with a doc file in the background, then text merged, and then "Save(d) To PDF" without user intervention. But I would like to avoid using/requiring MSWord. And to hopefully cut the process from a 4 or 5 step process to 1 or 2.

Thanks.
lcprinter = GETPRINTER()
*---
*--- Thisform.Chtmleditor1.oIE.Document.execCommand("Print",.t.,0)
Thisform.Chtmleditor1.oIE.Document.execCommand("Print",.f.,lcPrinter)
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform