Page 1 of 1

Print Selection

Posted: Wed Jan 23, 2013 8:19 pm
by rclendenon
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,

Re: Print Selection

Posted: Thu Jan 31, 2013 10:00 pm
by SamiKharma
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

Re: Print Selection

Posted: Thu Jan 31, 2013 10:08 pm
by rclendenon
Yes

Re: Print Selection

Posted: Fri Feb 01, 2013 9:58 am
by SamiKharma
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