Page Range Printing

The PDF Creator enables you to create secure PDF documents and to view, print and process existing PDF documents.
If you have any questions about the installation and usage of the PDF Creator please post them here.
Post Reply
mcmullank
Posts: 7
Joined: Fri Jun 10 2005

Page Range Printing

Post by mcmullank »

When I attempt to show the standard windows print dialogue for the PDFCreativeX control by using the command

PDFCreativex1.StartPrint "", True

Thestandard dialogue box appears but I cannot enter a page range selection as this is greyed out. Is there a way to use the standard print dialogue box with the selection function enabled?

The version of the control is 2.0f

Regards
Kris
Jose
Amyuni Team
Posts: 553
Joined: Tue Oct 01 2002
Contact:

Post by Jose »

Hello,

If you wish to allow your users to select a print range, then you will need to use the Print() function.

The .StartPrint() is designed to be used with the PrintPage() method.

Hope this helps?
mcmullank
Posts: 7
Joined: Fri Jun 10 2005

Post by mcmullank »

When i try the this function (me.creativex.print), I get an error generated, error number 438 (object doesn't support this object or method.

Can you provide a sample of code to allow the printing of a page selection please.
Jose
Amyuni Team
Posts: 553
Joined: Tue Oct 01 2002
Contact:

Post by Jose »

Hello,

This situation you have encountered can be resolved by placing the print() function within a With/End With. This happens because Visual Basic is trying to call the VB Printer object and not the PDF Creator’s print() function.

Another option is to object.[Print] (i.e. the Print method between brackets) instead of the With/End method.

Hope this helps?

Private Sub cmdPrint_Click()

With PDF

'Print(PrinterName As String, Prompt As Long)
'If Prompt is set to True,
'the user is prompted with the printer selection dialog box.
'Prints to the default printer
'***Scaling Options

' .ScaleToPrinter = acScaleBoth
' .ScaleToPrinter = acScaleHorizontal
' .ScaleToPrinter = acScaleNone
' .ScaleToPrinter = acScaleVertical

' Example: Fit to Paper
' .ScaleToPrinter = acScaleBoth

.Print "", False
End With

End Sub
Post Reply