Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can I print a .TIFF file ?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00390349
Message ID:
00390724
Vues:
9
>At first make a form and insert two ActiveX controls: Kodak Image Admin (ctlImageAdmin) and Kodak Image Edit (ctlImageEdit). Then insert a command button (cmdPrint).
>
>
>In form Load event put code:
>    ' initial settings
>    With Me.ctlImageEdit.Object
>        .AutoRefresh = True
>        .SelectionRectangle = False
>        .ScrollShortcutsEnabled = True
>        .DisplayScaleAlgorithm = wiScaleOptimize   ' 4
>        .ImagePalette = wiPaletteGray8   ' 2 - I don't work with colors.
>    End With
>
>    ' variable strFullFileName contains the full file name (with path). You
>    ' can use UNC here.
>    ' We start from the first page.
>    With Me.ctlImageAdmin.Object
>        .Image = strFullFileName
>        .PageNumber = 1
>    End With
>
>    With Me.ctlImageEdit.Object
>        .Image = Me.ctlImageAdmin.Object.Image
>        .Page = 1
>        .Display   ' display the image
>    End With
>
>In Click event of cmdPrint put the code:
>
>    With Me.ctlImageEdit.Object
>        nFromPage = .Page
>        nToPage = .Page
>        nHowToPrint = 2 ' 0 -Pixel to pixel, 1 -Inch to inch (default), 2 -Fit to page
>        bPrintAnnotation = True
>        .PrintImage nFromPage, nToPage, nHowToPrint, bPrintAnnotation
>    End With
>' Note: PrintImage method has several more parameters, which I don't use.
>
>
>The code above is written in VB, but you can easily convert it to VFP.
>
>HTH, Igor

Thank you very much, by the way 'easily convert to VFP' is easy to say...:)
Bret Hobbs

"We'd have been called juvenile delinquents only our neighborhood couldn't afford a sociologist." Bob Hope
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform