
PrintPRO™ v3 FAQ |
![]() |
| Q1: How can I determine if I have the latest version of a Pegasus control? |
| Q2: How do I print an image using PrintPRO? |
| Q3: How do I print a multi-page TIFF image using ImagXpress and PrintPRO? |
| Q4: How do I license a PrintPRO control on a webpage? |
| Q5: The Page Property is not being reset after printing the image. Why? |
| Q6: How Do I Print to a File? |
| Q7: How do I distribute my application (in .NET, Delphi, VB etc.)? |
| Q8 : What DLL's do I need to distribute with my application? |
Q1: How can I determine if I have the latest version of a Pegasus control? |
| Please download the PegConnect utility program from the following link: PegConnect or reference the Latest Builds page. |
Q2: How do I print an image using PrintPRO? |
| The sample code listed below demonstrates this. Please note that an ImagXpress control is being used to view the image in this example. Dim a As Integer Dim b As Integer PrintPRO1.hDib = ImagXpress1.hDib PrintPRO1.ScaleMode = SCALE_Pixel PrintPRO1.StartPrintDoc a = PrintPRO1.ScaleWidth - PrintPRO1.LMargin b = PrintPRO1.ScaleHeight - PrintPRO1.TMargin - PrintPRO1.BMargin PrintPRO1.PrintDIB PrintPRO1.LMargin, PrintPRO1.TMargin, a, b, 0, 0, 0, 0, True PrintPRO1.EndPrintDoc |
Q3: How do I print a multi-page TIFF image using ImagXpress and PrintPRO? |
| ImagXpress Standard Edition does not support saving multi-page TIFFs but can read them. The sample code listed below demonstrates how to print a multi-page TIFF. Dim a As Integer Dim b As Integer Dim counter As Integer For counter = 1 To ImagXpress1.NumPages(ImagXpress1.FileName) If counter > 1 Then PrintPRO1.NewPage ImagXpress1.PageNbr = counter ImagXpress1.FileName = ImagXpress1.FileName PrintPRO1.hDib = ImagXpress1.CopyDIB PrintPRO1.PrintDialog PrintPRO1.StartPrintDoc a = PrintPRO1.ScaleWidth - 1 - PrintPRO1.LMargin b = PrintPRO1.ScaleHeight - 1 - PrintPRO1.TMargin - PrintPRO1.BMargin PrintPRO1.PrintDIB PrintPRO1.LMargin, PrintPRO1.TMargin, a, b, 0, 0, 0, 0, True Next counter PrintPRO1.EndPrintDoc |
Q4: How do I license a PrintPRO control on a webpage? |
| Declare the PrintPRO object with these minimum required parameters. The correct values for ErrStr, ErrCode and ErrInfo will be properly generated for your machine and placed here by the ActiveX Control Pad. These values will change when switching from trial version to paid licensing. <OBJECT ID="PrintPRO1" WIDTH="36" HEIGHT="31"CLASSID=CLSID:66157B4F-9E4A-488C-92A4-4434A16FCBF2> <PARAM NAME="_ExtentX" VALUE="953"> <PARAM NAME="ExtentY" VALUE="794"> <PARAM NAME="ErrStr" VALUE="C33D27899ED57F476D6C96B45922A46B"> <PARAM NAME="ErrCode"VALUE="1113150773"> <PARAM NAME="ErrInfo" VALUE="408225263"> <PARAM NAME="_cx" VALUE="953"> <PARAM NAME="_cy"VALUE="794"> In scripting, call the IntegratorWeb method with the string you received from Pegasus when you licensed PrintPRO. Sub window_OnLoad() PrintPRO1.IntegratorWeb "www.mysite.com\PrintPROdemo.htm?2F009BA4D518CDAEB73D9BF40D552AE1" End Sub You might also want to take a look at the following links: Issues with Pegasus Controls on a web page How to resolve some common problems with a Pegasus control on a web page |
Q5: The Page Property is not being reset after printing the image. Why? |
| Please make sure that the SelectDefaultPrinter method or SetDefaultPrinter method is being called before using the StartPrintDoc method. |
Q6: How Do I Print to a File? |
| This sample shows that with PrintPRO printing to a file is very much the same as generating printer output but with a few properties set to the appropriate values. Any printer output, regardless of how it is generated, can be easily directed to a file. 'NOTE: all of the dimensions in this demo are in twips. 'Give the document a name. The default document 'name is PrintPRO Document. ' PrintPRO1.DocName = "Pegasus's PrintPRO Demo" PrintPRO1.OutputFileName = App.Path + "\PegasusTst.tif" 'Direct output to a file instead of a printer. PrintPRO1.PrintToFile = True PrintPRO1.SaveFileType = PP_TIF Specify the DPI for the file PrintPRO1.RequestedDPI = 100 'Start a print job by starting a new page. PrintPRO1.StartPrintDoc PrintPRO1.PrintPreviewOnly = False 'Print the information on the page just as you would for PrintPRO1.BackStyle = 1 PrintPRO1.ForeColor = RGB(255, 255, 255) PrintPRO1.BackColor = RGB(0, 0, 0) PrintPRO1.Font.Name = "arial" PrintPRO1.Font.Bold = True PrintPRO1.Font.Size = 24 PrintPRO1.Alignment = ALIGN_CenterJustifyMiddle prWidth = PrintPRO1.PWidth PrintPRO1.PrintTextAligned " Hello! Check out PrintPRO 4.0 ", 1000, PrintPRO1.TMargin, prWidth - 1000, 1100 ' Add a previously loaded graphic to the output. PrintPRO1.PrintPicture 1640, 5700, 0, 0, 0, 0, 0, 0, True End the print job. PrintPRO1.EndPrintDoc ' |
Q7: How do I distribute my application (in .NET, Delphi, VB etc.)? |
| PLEASE NOTE: You must have your unlock codes to distribute your application in the majority of the scenarios outlined below. If you do not have these please complete the form at: http://www.pegasusimaging.com/lostcodes.htm and the codes will be sent to you. 1) If you are using .NET as your development tool you must call the UnlockPICPrintPRO.PS_Unlock function and pass as the parameters the same 4 unlock codes that were received at the time of purchase. For C# Developers: Call the static PS_Unlock function in the class constructor BEFORE the generated call to InitializeComponent() as follows: Public FormMain() { UnlockPICPrintPRO.PS_Unlock(1234, 1234, 1234, 1234); InitializeComponent(); } For Visual Basic. NET Developers: Call the static PS_Unlock function in the class constructor (i.e. New function) BEFORE the generated call to InitializeComponent () as follows: Public Sub New () MyBase.New () UnlockPICPrintPRO.PS_Unlock(1234, 1234, 1234, 1234) IntializeComponent () End Sub 2) If you are using Delphi as your development tool you must declare the PS_Unlock function as outlined below: procedure PS_Unlock(pw1, pw2, pw3, pw4: LongInt); stdcall external 'printpro3.dll'; begin Application.Initialize; PS_Unlock(123456789,123456789,987654321,12345); Application.CreateForm(TForm1, Form1); Application.Run; end. 3) If you are using the PrintPRO COM object in VC++ as your development tool you must declare the PS_Unlock function as outlined below: The PrintPRO COM Object contains a locking mechanism that does not permit you to distribute applications created with evaluation versions of PrintPRO. When you register PrintPRO, you are given a set of 4 numeric registration codes that are your individual password set for unlocking PrintPRO for distribution. If you do not unlock PrintPRO, applications will not run on end user machines. Before distributing an application, you must unlock PrintPRO. PP_Open.cpp is included with PrintPRO to handle licensing for the COM Object. You can find PP_Open.cpp in the PrintPRO VCCOM\Include directory. In the PP_Open() function, locate the call to PS_Unlock(). Replace the four parameters in that call with the four registration codes you obtained when you purchased PrintPRO. When you compile your project, PrintPRO should be unlocked meaning that you should no longer see the "Evaluation" message boxes. 4) If you are using the PrintPRO control as a COM object in VB you must declare the PS_Unlock function as outlined below: 1) Add a reference to the PrintPRO control via Project|References. 2) Declare the PS_Unlock function as follows: Private Declare Sub ControlUnlock Lib "printpro3" Alias "PS_Unlock" (ByVal pw1 As Long, ByVal pw2 As Long, ByVal pw3 As Long, ByVal pw4 As Long) 3) Dim the PrintPRO control object: Dim pp As printpro3.PrintPRO 4) Call the unlock method: ControlUnlock 1234, 1234, 1234, 1234 Set pp = New printpro3.PrintPRO 5) If you are using the control within HTML you must obtain a web license string. This web license string is received from our sales department when the web license is purchased. The web license string is passed as the parameter to the IntegratorWeb method. Please refer to http://www.pegasusimaging.com/weblicfaq.htm for more information on using the control within a web environment. 6) If you are using the PrintPRO ActiveX Control open your project with your development tool (Visual Basic or Delphi) and rebuild the EXE. The new registration information will be automatically incorporated in the new executable. |
Q8 : What DLL's do I need to distribute with my application? |
| For .NET Windows Forms Applications: PEGASUSIMAGING.WINFORMS.PRINTPRO3.DLL For All Other Applications: PrntPRO3.dll If you are using the PrntPRO3.dll, it needs to be registered after it is installed. Make sure that your installation program registers the PrintPRO COM component before you run your application. |