Jump to content
obamaself

Impressao de Form

Recommended Posts

obamaself

Boas

com o printdocument é possivel imprimir em PDF?

Ao imprimir abre o OneNote

Share this post


Link to post
Share on other sites
bioshock

Porque são duas coisas distintas. Para isso utilizas o sistema Root() - que nada tem haver com printDocuments.

Share this post


Link to post
Share on other sites
obamaself

mas DAAAA sim !  :cheesygrin:

Eu utilizei o bioPdf . Podes encontrá-lo aqui:  http://www.biopdf.com/

Aqui está o código:


Dim obj As New bioPDF.PDFPrinterSettings
        Dim ÉPDF As Boolean = Nothing
        Dim PDF_PRINTERNAME As String = "PDF Writer - bioPDF"
        Dim Directorio As String = "C:\"
        Dim Nome_Arquivo As String = "aaaaa" 'CStr(Now)

        'obj.SetValue("Output", Directorio & "\" & Nome_Arquivo & ".pdf")
        'obj.SetValue("Output", "C:\Test.PDF")
        obj.SetValue("ConfirmOverwrite", "no")
        '  obj.SetValue("ShowSaveAS", "never")
        obj.SetValue("ShowSettings", "never")
        obj.SetValue("ShowPDF", "yes")
        obj.SetValue("RememberLastFileName", "no")
        obj.SetValue("RememberLastFolderName", "no")
        obj.WriteSettings(True)

        Dim pdPrinter As New PrintDocument
        Dim ppvwPrinter As New PrintPreviewDialog
        Clipboard.SetImage(My.Resources.logotipo)

        AddHandler pdPrinter.PrintPage, AddressOf PrintDocument1_PrintPage

        ppvwPrinter.Document = pdPrinter
        ppvwPrinter.Width = Screen.PrimaryScreen.Bounds.Width
        ppvwPrinter.Height = Screen.PrimaryScreen.Bounds.Height
        ppvwPrinter.PrintPreviewControl.Zoom = 0.5
        ppvwPrinter.ShowDialog()



        pdPrinter.Dispose()
        ppvwPrinter.Dispose()



Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.