printing from gdviewer

Discussions about GdPicture.NET usage in non managed applications built in vb6, Delphi, vfp, MFC c++ etc...
Post Reply
Posts: 11
Joined: Tue May 01, 2012 3:02 pm

printing from gdviewer

Post by glnoble » Fri Jun 15, 2012 2:53 am

we are doing a com version 5 to .net V8 conversion. In our application we allow the user to open a PDF using the viewer then locate a page then click a print button to print the current page being viewed.

The simple function is below. the logic worked perfectly in com version 5 but I am getting an error of "Object doesn't support this property or method". Its the gdviewer1.print line which is throwing the error.

Our development system is Windows 7 64bit, using Microsoft Access 2010, running the newest version of gdpicture. The function is below:

Code: Select all

Private Sub print_one_Click()
On Error GoTo Handler_Err
    If Print_cancel = False Then 'ok to use viewer to print
        If GdViewer1.PrintSetActivePrinter(Application.Printer.DeviceName) Then
            Me!xresponse.Caption = ""
            GdViewer1.PrintSetFromToPage GdViewer1.CurrentPage, GdViewer1.CurrentPage
            Me!xresponse.Caption = "Unable to set printer"
        End If
    End If

    Exit Sub
Call err_log_entry(Err.Number, Err.Description, "image pop print 1")
Resume Handler_Exit
End Sub

User avatar
Site Admin
Posts: 5744
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: printing from gdviewer

Post by Loïc » Fri Jun 15, 2012 10:33 am

Print is a reserved keyword in vba. Therefore we've implemented a new function that should be used instead: PrintInterop() ;)

Posts: 11
Joined: Tue May 01, 2012 3:02 pm

Re: printing from gdviewer

Post by glnoble » Fri Jun 15, 2012 6:47 pm

worked perfectly, quick response and good advice, very thankful!

Posts: 4
Joined: Tue Apr 17, 2012 5:37 pm

Re: printing from gdviewer

Post by johnmcrin » Sat Aug 04, 2012 8:39 pm

I would like all of the pan and zoom actions in one viewer to be mirrored identically in the second viewer, and vice versa. Is there an existing mechanism to handle this?

Posts: 352
Joined: Tue Sep 27, 2011 11:47 am

Re: printing from gdviewer

Post by SamiKharma » Sat Aug 04, 2012 9:11 pm


Even though your question should not be in this post, but in an individual post, here it the answer:

Best Regards,

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests