Print Selection

Discussions about document printing in GdPicture.NET using GdPictureImaging.
Post Reply
rclendenon
Posts: 18
Joined: Tue Mar 20, 2012 4:36 pm

Print Selection

Post by rclendenon » Wed Jan 23, 2013 8:19 pm

I am using the following code to print a section of a pdf that has been zoomed into using the dynamic zoom feature:

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()
This works fine for the base pdf, however, it will not print any annotations/highlighting that has been done to the pdf. Is there a way to include the annotations/highlighting in the print? If I print the whole document in 'gdViewer1' I will get the mark ups.

Thanks,

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

Re: Print Selection

Post by SamiKharma » Thu Jan 31, 2013 10:00 pm

Hi,

To make sure I understand you:
If you print the whole document, you get the annotations printed, meaning that CanPrint property of the annotations is set to true. But you want your code to copy a part and be able to print the annotations in that part, once you do that, you have to reload or insert the annotations into the new part, then you can print them, the CopyRegionToClipboard does not copy the annotations as well.

Best Regards,
Sami

rclendenon
Posts: 18
Joined: Tue Mar 20, 2012 4:36 pm

Re: Print Selection

Post by rclendenon » Thu Jan 31, 2013 10:08 pm

Yes

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

Re: Print Selection

Post by SamiKharma » Fri Feb 01, 2013 9:58 am

Hi,

Then you basically have two options:
1. Burn the annotations to the page before you crop the image.
2. Save the Annotations to XMP, Crop the Image, Load the annotations to the Cropped Image, then move the Annotations with respect to the position corresponds to. To move the Annotation you need to set the Left and Top Properties of the Annotation. Just mark that those properties correspond to the middle point of the bounding box of the annotation and not the annotation itself.

Best,
Sami

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest