Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Printing from the webbrowser control
Message
De
19/11/2010 19:10:01
Mike Sue-Ping
Cambridge, Ontario, Canada
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Titre:
Printing from the webbrowser control
Divers
Thread ID:
01489859
Message ID:
01489859
Vues:
121
I'm trying to print from the webbrowser control that is hosted in a VFP9 form. I'd found that I can issue the following command to print the content that is rendered in the control:

THISFORM.oWb.execWB(7, 0)

where oWb is the webbrowser control.

Well it *almost* works. Here's my issue - if I generate all my content into a local html file and I navigate to it then print it using the command above, all is ok. If, however, I first navigate to a "shell" html file that contains several empty divs into which I then "inject" content, it does not print anything although the content looks fine on my screen!

My question is, does the webbrowser control need to have all content in the physical html file before it can print it? As I said, the page looks fine on my computer screen (with content injected into the divs that are the only "real" items in the html file). It just doesn't print the content. If I were to write out the body's innerhtml to a local html file prior to calling the print command, it's seem to work ok. I was hoping to avoid this last step though.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform