跳至主內容

搜尋

搜尋

Seagull.bartender.print.labelformatthumbnail.create() Error With Bartender 10.0 Only

評論

9 條評論

  • Avatar
    Domingo Rodriguez
    版主

    1. The Create() method of the "LabelFormatThumbnail" class needs 4 parameters:

     

    FormatFileName : The file name of the LabelFormatDocument to export the thumbnail of.

    BackgroundColor : The background color of the thumbnail image. This parameter does not take into account the alpha channel of a Color.

     

    Width : Defines the width of the exported thumbnail in pixels.

     

    Height : Defines the height of the exported thumbnail in pixels.

     

    As an example:

     

    Public Sub Demo()
       ' Create an image of the format. Dim image As Image = LabelFormatThumbnail.Create("C:\Format1.btw", Color.White, 400, 400)

       ' Save that image to file
       image.Save("C:\ImageThumbnail.bmp")
    End Sub

     

     

    BTW, if you're wanting to test the latest version of BarTender (the one we currently sell), please download and test BT v10.1

    0
  • Avatar
    Legacy Poster

    Well, I am passing the parameters you mentioned. This is my call:

     

    Dim thumbnail As Image = Seagull.BarTender.Print.LabelFormatThumbnail.Create(file.FullName, System.Drawing.Color.Gray, width, height)

     

    Where file.fullname is the full path for a System.IO.fileinfo variable that targets a bartender .btw file, width & height are integer variables set for 120.

     

    As I explained above this works just fine as long as the application is run in a PC with Bartender 9.3 or 9.4. About Bartender 10.0, we are testing what we already bought, in other words we had already paid for 10.0 so is not that we are "testing a trial version".

     

    Any ideas then about the Thumbnails problem?

    Could you try to recreate the problem yourself?

    How about my other question above on the detailed steps of how to reference the SDK DLLs with 9.3?

     

    Thank you again,

    0
  • Avatar
    Domingo Rodriguez
    版主

    Let me know if you've the same problem when testing BT v10.1. If yes, please contact our support team by email / telephone and report the issue to us:

    http://www.bartenderbarcodesoftware.com/label-software/technical-support.aspx#contact

     

    With regards to 2. I prefer someone else to reply to this, as I don't have the whole details.

    0
  • Avatar
    Legacy Poster

    Our interest as developers is to make it work in what we already have licensed which is 10.0, since this is not normal behavior.

    Is this something you can help me escalate to your developers? I would appreciate any help to solve it.

    0
  • Avatar
    Domingo Rodriguez
    版主

    Comment from our developers:

     

    "Between those versions we changed how the thumbnail is generated. To generate the thumbnail the older versions used a Windows shell extension where the newer versions create the thumbnail directly by reading the BTW document file. The newer versions no longer installs the thumbnail shell extension. The user gets an exception because he is using (distributing) the older Seagull.BarTender.Print assembly DLL with his application, because the assembly is looking for the thumbnail shell extension which does not exist for 10.x installs.
    I would suggest as a possible workaround to use the Seagull.BarTender.Print.dll installed in the GAC. In this way they will get the correct Seagull.BarTender.Print assembly for the correct version of BarTender. Note: We started installing to the GAC (global assembly cache) with version 9.4."
     
    As we started installing the assemblies to the GAC in BT v9.4, you will still need to distribute the 9.3 DLL if BT v9.3 is in use. So basically, in my point of view, you will need to compile two versions for your application, one to be compiled with v9.3 for BT v9.3, one with 10.0 to be used with v10.0.
    0
  • Avatar
    Legacy Poster

    How to pass parameters via registry vb.net.

    0
  • Avatar
    Domingo Rodriguez
    版主

    Mauro,

     

    I'm not sure I get your question... Could you please clarify and also let us know if it's related to this topic?

    0
  • Avatar
    Legacy Poster

    Hi there , we have BT9.4 and i'm trying to get an Access DB to display a thumbnail.

     

    I'm not a programmer but due to circustances I need to get this done before the end of hte month.

     

    Can anyone help me please. Mod please move to another topic if you feel that it should be.

     

    Here is my code, failing on this line "Temp_Image_Lab = LabelFormatThumbnail.Create(File_Path_and_Name, Colour.White, 400, 400)

    The error= "Object required"

    I do note that the Dim....image doesn't show up in coloured text like String does, is Image not a correct term in VBA? :

     

    Private Sub List_Labels_AfterUpdate()
        ' Create an image of the format.'
        Dim Temp_Image_Lab As image
        Dim File_Path As String
        Dim LabelFilename As String
          
        Dim btApp As BarTender.Application
        Set btApp = CreateObject("BarTender.Application")
       
        File_Path = "G\Company\Vector\Bartender\BartenderLabels\LABELS\"
     
       LabelFilename = Chr(34) & Me.[List_Labels].[Column](2) & Chr(34)
        File_Path_and_Name = File_Path & LabelFilename
       
        Temp_Image_Lab = LabelFormatThumbnail.Create(File_Path_and_Name, Colour.White, 400, 400)
       
        'Do something with the above to show on screen (e.g. save to a temporary location / have an image box displaying the file at that location'
    
        btApp.Quit
    
    End Sub
     
    

     

    Thanks.

    0
  • Avatar
    Domingo Rodriguez
    版主

    The method you're trying to use is from our .NET SDKs, and therefore cannot be used with VBA.

     

    Please open BarTender's Help (F1 key) and look into Automating BarTender using ActiveX Automation. Do the methods available in the "Format" object give you what you need, such as "ExportToFile()" or "ExportToClipboard()"?

    0

登入寫評論。