|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
PrintPreviewDialog Control and HTMLHello,
Is there a way that anyone knows of to preview an HTML string and have it formatted as HTML in a PrintPreviewDialog? In other words, can the PrintDocument that is required for this render/understand HTML? Everything that I have seen looks like it will just print out the raw string and not the rendered HTML. I know I can do this with a WebBrowser Control and the ShowPrintPreviewDialog method, but I was hoping to avoid using the WebBrowser control this time. Thanks for any help. Dvdastor,
Why not the webbrowser? Probably every other solution will takes more from your time. Just my thought, Cor <dvdas***@yahoo.com> schreef in bericht Show quoteHide quote news:1160065617.995007.233190@i3g2000cwc.googlegroups.com... > Hello, > > Is there a way that anyone knows of to preview an HTML string and have > it formatted as HTML in a PrintPreviewDialog? In other words, can the > PrintDocument that is required for this render/understand HTML? > Everything that I have seen looks like it will just print out the raw > string and not the rendered HTML. > > > I know I can do this with a WebBrowser Control and the > ShowPrintPreviewDialog method, but I was hoping to avoid using the > WebBrowser control this time. > > Thanks for any help. > Cor,
Thanks for the reply. I would love to use the WebBrowser control. However, i am running into a major snag. I am trying to show a PrintPreviewDialog with rendered HTML, but I don't want to launch the form that shows that Web Browser control. The way I have my code right now, is as follows: Public Sub PrintPreview(ByVal strHTMLItems As String) Try WBControl = New WebBrowser AddHandler WBControl.DocumentCompleted, AddressOf WBControl_PreviewDocumentCompleted WBControl.DocumentText = (strHTMLItems) WBControl.Height = 800 WBControl.Width = 800 Catch ex As Exception End Try End Sub Private Sub WBControl_PreviewDocumentCompleted(ByVal sender As Object, ByVal e As WebBrowserDocumentCompletedEventArgs) 'shows the actual preview. WBControl.ShowPrintPreviewDialog() End Sub This runs fine, but it opens the dialog box for the print preview really small. Even though I set the size to 800 x 800, it does not resize it. can you offer any assistance on this? Cor Ligthert [MVP] wrote: Show quoteHide quote > Dvdastor, > > Why not the webbrowser? Probably every other solution will takes more from > your time. > > Just my thought, > > Cor > > <dvdas***@yahoo.com> schreef in bericht > news:1160065617.995007.233190@i3g2000cwc.googlegroups.com... > > Hello, > > > > Is there a way that anyone knows of to preview an HTML string and have > > it formatted as HTML in a PrintPreviewDialog? In other words, can the > > PrintDocument that is required for this render/understand HTML? > > Everything that I have seen looks like it will just print out the raw > > string and not the rendered HTML. > > > > > > I know I can do this with a WebBrowser Control and the > > ShowPrintPreviewDialog method, but I was hoping to avoid using the > > WebBrowser control this time. > > > > Thanks for any help. > > Dvdastor,
I am not sure anymore of this, but I thought that you could hide it behind a panel. Did you try that? Cor <dvdas***@yahoo.com> schreef in bericht Show quoteHide quote news:1160143478.185196.122570@c28g2000cwb.googlegroups.com... > Cor, > > Thanks for the reply. I would love to use the WebBrowser control. > However, i am running into a major snag. I am trying to show a > PrintPreviewDialog with rendered HTML, but I don't want to launch the > form that shows that Web Browser control. > > The way I have my code right now, is as follows: > > Public Sub PrintPreview(ByVal strHTMLItems As String) > Try > > WBControl = New WebBrowser > AddHandler WBControl.DocumentCompleted, AddressOf > WBControl_PreviewDocumentCompleted > > WBControl.DocumentText = (strHTMLItems) > > WBControl.Height = 800 > WBControl.Width = 800 > > Catch ex As Exception > > End Try > End Sub > > Private Sub WBControl_PreviewDocumentCompleted(ByVal sender As > Object, ByVal e As WebBrowserDocumentCompletedEventArgs) > 'shows the actual preview. > WBControl.ShowPrintPreviewDialog() > > End Sub > > This runs fine, but it opens the dialog box for the print preview > really small. Even though I set the size to 800 x 800, it does not > resize it. > > can you offer any assistance on this? > > Cor Ligthert [MVP] wrote: >> Dvdastor, >> >> Why not the webbrowser? Probably every other solution will takes more >> from >> your time. >> >> Just my thought, >> >> Cor >> >> <dvdas***@yahoo.com> schreef in bericht >> news:1160065617.995007.233190@i3g2000cwc.googlegroups.com... >> > Hello, >> > >> > Is there a way that anyone knows of to preview an HTML string and have >> > it formatted as HTML in a PrintPreviewDialog? In other words, can the >> > PrintDocument that is required for this render/understand HTML? >> > Everything that I have seen looks like it will just print out the raw >> > string and not the rendered HTML. >> > >> > >> > I know I can do this with a WebBrowser Control and the >> > ShowPrintPreviewDialog method, but I was hoping to avoid using the >> > WebBrowser control this time. >> > >> > Thanks for any help. >> > >
Thread, UI update is this ok?
Redim Multidimenional Arrays MS Word Chart filled with data - URGENT PLEASE VB6 --> VB 2005 upgrade ...IDE now VERY slow!!! Importing DLLs during runtime Can a custom object know it's owner Drag Bitmap tutorial/code anywhere? Can I create controls with static ID's? Encoding question How To create fixed column formatting |
|||||||||||||||||||||||