Results 1 to 6 of 6
  1.    #1  
    Hello,

    I'm currently develloping an applition that is needs print functionality. For this I'm trying to print with PrintBoy SDK. When I use the Pag* library everything works just fine. But I need some more complex print functionality because I have to print forms, for this I need to print Boxes around some text. I've tried using the Prn* library for this but I'm having some problems with this. The printer I'm using is the HP deskjet 450 mobile printer. Below I wil first describe 3 options I tried printing boxes and I've also supplied the code I used to try this. Below the examples I'm giving some explanation of the trouble I'm having.

    1. Printing using PrnDrawRectangleFrame
    2. Creating an bitmap and printing with PrnDrawBitmap
    3. Creating an bitmap and printing with PrnDrawBitmapScale

    For testing I used 3 methods

    Method 1:

    Err PrintRectangle()
    {
    RectangleType frame;
    RctSetRectangle( &frame, 10, 10, 100, 100 );
    SysLibLoad (printMgrTypeID, printMgrCreatorID, &refNum);

    PrnOpenByConfig( refNum );
    PrnSetLicenseKey( refNum, "PRINTBOY_SDK_TRIAL" );

    PrnDrawRectangleFrame( refNum, &frame );

    PrnNewPage (refNum);
    PrnFlush( refNum );
    PrnClose (refNum);

    SysLibRemove (refNum);
    }

    Method 2:

    Err PrintBitmap( UInt16 xSize, UInt16 ySize)
    {
    BitmapType *bitmap;
    RectangleType frame;
    WinHandle offscreen;
    WinHandle win;
    Err err;

    SysLibLoad (printMgrTypeID, printMgrCreatorID, &refNum);

    win = WinGetActiveWindow();
    bitmap = BmpCreate( xSize, ySize, 1, NULL, &err);

    offscreen = WinCreateBitmapWindow(bitmap, &err);
    WinSetDrawWindow( offscreen );

    RctSetRectangle( &frame, 10, 10, xSize - 20, ySize - 20 );
    WinDrawRectangleFrame( rectangleFrame, &frame );

    WinSetDrawWindow( win );
    WinDeleteWindow( offscreen, true );

    PrnOpenByConfig( refNum );
    PrnSetLicenseKey( refNum, "PRINTBOY_SDK_TRIAL" );
    PrnDrawBitmap( refNum, bitmap, 10, 10 );

    PrnNewPage (refNum);
    PrnFlush( refNum );
    PrnClose (refNum);

    BmpDelete( bitmap );

    SysLibRemove (refNum);
    }

    Method 3:

    Err PrintBitmapScale( UInt16 xSize, UInt16 ySize, UInt16 xSize2, UInt16 ySize2 )
    {
    BitmapType *bitmap;
    RectangleType frame;
    RectangleType area;
    WinHandle offscreen;
    WinHandle win;
    Err err;

    SysLibLoad (printMgrTypeID, printMgrCreatorID, &refNum);

    win = WinGetActiveWindow();
    bitmap = BmpCreate( xSize, ySize, 1, NULL, &err);

    offscreen = WinCreateBitmapWindow(bitmap, &err);
    WinSetDrawWindow( offscreen );

    RctSetRectangle( &frame, 10, 10, xSize - 20, ySize - 20 );
    WinDrawRectangleFrame( rectangleFrame, &frame );

    WinSetDrawWindow( win );
    WinDeleteWindow( offscreen, true );

    RctSetRectangle( &area, 10, 10, xSize2, ySize2 );

    PrnOpenByConfig( refNum );
    PrnSetLicenseKey( refNum, "PRINTBOY_SDK_TRIAL" );
    PrnDrawBitmapScale( refNum, bitmap, SCALE_METHOD_SIMPLE , &area );

    PrnNewPage (refNum);
    PrnFlush( refNum );
    PrnClose (refNum);

    BmpDelete( bitmap );

    SysLibRemove (refNum);
    }

    With method 1 I have the problem that my RectangleFrame isn't completly drawn. I'm missing the right side of the Rectangle ( I think because the printer can't go up the paper ofcourse ). So I only have 3 of the 4 lines of my rectangle. After this it is also Impossible to print text inside my rectangle because the print head is below the rectangle.

    With method 2 it works good when I try to print small rectangles. Also printing text with the standard Palmos system font ( Not included in this test method ). Only I can't use the rich text font's of PrintBoy. Secondly I'm getting an fatal exception when I call this method with parameters of 350, 350 and higher. With 300, 300 this works good.

    With method 3 I'm having the same problems as with method 2. Only I think this method doesn't work correctly because the last argument I give to PrnDrawBitmapScale does nothing. If I pass an rectangle of 10 * 10 it prints the same as an rectangle of 300 * 300.

    I hope someone can help me with this problem.

    Thanks for your assistance.

    Roy.
  2.    #2  
    Is there nobody who works with printboy sdk??
  3. #3  
    Originally posted by r.versteeg
    Is there nobody who works with printboy sdk??
    I prefer PalmPrint (as I think most developers do) because they don' rip off the developers as well as the end users like PrintBoy does.
  4.    #4  
    Yes i'm currently using palmprint,
    for printing text this works fine. But i also need to print some graphics and this is not possible with palmprint

    Roy.
  5. #5  
    Have you looked at the TealPrint API? Our produts use both PalmPrint and TealPrint.

    (Not crazy about the requirements put on the developer for PrintBoy here either).
  6.    #6  
    Thanks everyone,

    I have looked at the tealprint api and it looks prommising. But I have found the solution to my printboy problems. The problem with the large bitmaps is a bug in printboy and they will try to solve this. But more importantly I'm now able to print text boxes and large graphical text. This all is possible because of a new TruePage driver that doesn't have the vertical motion problem. And about ripping off the develloper as wel as the customer: We sell the treo including all te software that is needed for our application. So it is cheaper to buy only the sdk licenses from printboy becaus they only cost 1$ per license and the users don't need the full PrintBoy application.

    Roy.

Posting Permissions