Results 1 to 7 of 7

Thread: vpe71prnt - work in progress

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2009
    Location
    Fresno, CA
    Posts
    925

    Default vpe71prnt - work in progress

    The attached file is my work in progress in getting Carl Schaer's WinPrint to VPE package brought up to date for use with the latest version of VPE, 7.1. This works fine so far, but we have not put this code into production. It should be considered "beta". Once we put it into production I was planning on uploading it to VDF Guidance since that is where the original package is located. I'm making this available now for developers that may want to start testing this out on their own. If you fix anything or have anything to add, I could coordinate merging changes back into a single package.

    We also use Sture's VDF Query, which also needs to be modified for the new version of VPE. (This is one of the holdups on putting this into production.)

    The big change from 3.6 and prior versions is the switch from only being able to use "VPE units" (1/1000mm IIRC) to being able to use inches, CM, or VPE units for the positions in VPE calls. Instead of using integer parameters, all of the VPE DLL calls have switched to double precision parameters for positions. For backwards compatibility, VPE allows you to continue using the VPE units, which is what I've done. A long term goal would be to convert all of the DataFlex code to use reals instead of integers, and remove the unit conversion function to go from CM or inches to VPE units. This might improve performance a little bit. (Just switching from 3.6 to 7.1 did boost performance around 10-15% IIRC)

    If you have another version of VPE from 4.0 on, this code will probably work if you modify the DLL call declarations accordingly.

    Another enhancement I'd like to do someday is to to get the header/footer information stored in a struct array instead of an array object. This could streamline the code a lot.

    Most changes have initials and dates but I've gotten a little lax about this recently. Generally changes that we've made will have my initials or JRM. I have removed most lines that were commented out entirely and replaced with new code, just to improve readability.

    I also split out the classes into separate files, just to make things a little easier to manage and navigate.

    Some changes that we have made are not documented, you may be able to use Beyond Compare or similar utility to find new functionality.

    One that was done recently was the addition of a FONT_RIGHT_DEC justification mode, which allows you to line up numbers of varying precision in the same column on the decimal point.

    Another change I made was to support switching paper sources within the print job (by setting property pBinOverride before calling DFNewPage, also see EnumerateBins)

    Another thing I added some time ago was support for printing RTF. I'm not sure, but I don't think that ever made it's way back into any "official" releases. (Send DFWritePosRTF to WinPrintID [rtftext] [fontattr] [position] [width])

    Also, I think we forked the DFWriteLine procedure, but that is going back quite a long ways so I'm not 100% sure but we do have comments to that effect. I think the original version was retained and renamed DFWriteLine2. The position with our version uses absolute coordinates from the edge of the page, and our note says it originally was relative to the margins set for the document. If you use absolute positions for DFWriteLine commands, this would certainly be something to test. This might be something we need to resolve before an official release.

    So that's it, enjoy!
    Attached Files Attached Files
    Best regards,

    Matt Davidian
    Datatech
    Fresno, CA
    www.datatechag.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •