Printing Selected Area

Discussions about document viewing.
Post Reply
rclendenon
Posts: 18
Joined: Tue Mar 20, 2012 4:36 pm

Printing Selected Area

Post by rclendenon » Tue Apr 03, 2012 3:50 pm

I am using the gdViewer to display a pdf. There are also several zooming tools that allow the user to focus on specific parts of the pdf. Is there a way to print only the portion of the pdf that is displayed in the viewer after a zoom? When I use the 'PrintDialogFit' option the 'Selected' option is greyed out and the complete document is printed.

Thanks in advance for your help,
Russell

User avatar
Loïc
Site Admin
Posts: 5689
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Printing Selected Area

Post by Loïc » Wed Apr 04, 2012 4:33 pm

Hello,

You can try do do something like this:

Code: Select all

        Dim l, t, w, h As Integer
        GdViewer1.GetDisplayedArea(l, t, w, h)
        GdViewer1.CopyRegionToClipboard(l, t, w, h)
        Dim GdViewer2 As New GdViewer
        GdViewer2.DisplayFromClipboard()
        GdViewer2.PrintDialogFit()
Kind regards,

Loïc

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

Re: Printing Selected Area

Post by johnmcrin » Tue Apr 17, 2012 6:58 pm

Only using the rectangular marquee tool is allowed to let me print selected area, I wish making a selection of a layer let me do that too.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest