Zum Hauptinhalt gehen

Suche

Suche

Activex Print Preview

Kommentare

2 Kommentare

  • Avatar
    Shotaro Ito
    In BarTender Enterprise Automation Edition, you can use Format.ExportPrintPreviewToImage method to export preview images, instead of print.

    [code]'Export preview images to "tmpPrevew" folder in current accdb(mdb) files folder. PNG format, 150dpi, black and white.'
    Call BtFormat.ExportPrintPreviewToImage(CurrentProject.path & "\tmpPreview", "IMG%PageNumber%.PNG", "PNG", btColorsMono, 150, &HFFFFFF, btSaveChanges)
    [/code]

    When current format setup results multiple pages (such as print 10 records, serialized with 10 copies for each record etc), it exports multiple image files such as
    "IMG1.PNG"
    "IMG2.PNG"
    ...
    "IMG9.PNG"
    "IMG10.PNG"

    So after export all images to a folder(the folder must be created beforehand), somehow you need to store all exported image's path to a table, then set the table as record source of a form/subform - which has a image control linked to the path.
    (I don't have a good sample code for that - hope you're good at VBA. BarTender .net SDK documentation's Print preview sample might give you some idea.)

    For Automation Edition,
    Format.ExportToFile image provides similar functionality - however it only exports single image of current design view. (cannot show serialized print result, multiple record's print result etc.)

    Hope that helps!
    0
  • Avatar
    Legacy Poster
    [quote name='Shotaro I -Seagull Support' timestamp='1335156406' post='2287']
    In BarTender Enterprise Automation Edition, you can use Format.ExportPrintPreviewToImage method to export preview images, instead of print.

    [code]'Export preview images to "tmpPrevew" folder in current accdb(mdb) files folder. PNG format, 150dpi, black and white.'
    Call BtFormat.ExportPrintPreviewToImage(CurrentProject.path & "\tmpPreview", "IMG%PageNumber%.PNG", "PNG", btColorsMono, 150, &HFFFFFF, btSaveChanges)
    [/code]

    When current format setup results multiple pages (such as print 10 records, serialized with 10 copies for each record etc), it exports multiple image files such as
    "IMG1.PNG"
    "IMG2.PNG"
    ...
    "IMG9.PNG"
    "IMG10.PNG"

    So after export all images to a folder(the folder must be created beforehand), somehow you need to store all exported image's path to a table, then set the table as record source of a form/subform - which has a image control linked to the path.
    (I don't have a good sample code for that - hope you're good at VBA. BarTender .net SDK documentation's Print preview sample might give you some idea.)

    For Automation Edition,
    Format.ExportToFile image provides similar functionality - however it only exports single image of current design view. (cannot show serialized print result, multiple record's print result etc.)

    Hope that helps!
    [/quote]

    That helps a LOT. Thank you for the quick reply! This is why Bartender is the only labeling software I sell.

    Not a problem regarding the serialization. I only need to display an image of the 1st label.
    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.