Skip to main content



<Exportprintpreviewtoimage> Cannot Print Out Text



  • Avatar
    Legacy Poster

    For more information, there has no problem if I use the same label file and data text file to print to printer by btEnginee.

  • Avatar
    Shotaro Ito

    Is that HP laser printer?

    Strange... try change to some common windows font such as Calibri, or OCRB-Seagull.

    Check that static text would print fine or not.

    if that won't work, please attach btw format from more reply options.

  • Avatar
    Legacy Poster

    Hi, attached is the btw file for your information, thanks ^^

  • Avatar
    Legacy Poster

    I tried to change the font to Calibri, OCRB-Seagull but didn't work.


    Also, I tried to change the XML code to print the label to the HP Printer and all the text can be printed without problem.


  • Avatar
    Shotaro Ito

    Thanks for the file - export to JPG fine in here with Bullzip PDF printer driver + BT10.1SR3 on Win8.1 x64. That makes me puzzled.

    you can run xml script below from BarTender UI (File > Run BTXML script) to export current document for quick tests.


    <?xml version="1.0" encoding="utf-8"?> 
    <!-- This script exports current Label format document's print preview to splecified folder.
    Execute from File > Run xml script.
    (XML Script can be used from BarTender Enterprise Automation Edition only)
    in <ImageFormatType> tag, specify file type (JPG/PNG/GIF/BMP etc)
    in <Folder> tag, export folder (relative path can be specified - "." means the same as same folder as format)
    in <FileNameTemplate> tag, specify file name (%PageNumber% is page number)
    in <DPI> tag, export resolution
    in <IncludeBorder> tag, specify label border
    in <IncludeMargins> tag, specify margins
    <XMLScript Version="2.0" Name="Job1" ID="123"> 
    <Command Name="Job1"> 
    <ExportPrintPreviewToImage ReturnImageInResponse="false"> 
  • Avatar
    Legacy Poster

    Thanks for information, it works if I run the script at BarTender UI.


    I've another question related to print to PDF driver.

    If printing to PDF driver, it will ask for file name confirmation.

    Is it I can put the output file name in the XML ?



  • Avatar
    Legacy Poster

    Sorry that I may not state the problem clear.

    The case is I have a program, which will generate a xml script and a text data file.

    Then it will call up the btengine to run the xml script and output the label to a jpg file.


    Tested that the XML script, text data file and the label work using the BarTender UI.


    Just by running the program, the result jpg file can only have barcode printed but other text info.


    Following is the code to print the XML script for your information :-


    Protected Sub print_by_XML(ByVal plabel, ByVal pxmlfile)

        Dim btEngine As New Seagull.BarTender.Print.Engine


        btEngine = New Seagull.BarTender.Print.Engine()




        btEngine.Window.VisibleWindows = Seagull.BarTender.Print.VisibleWindows.All


        Dim XMLResponse As String = btEngine.XMLScript(pxmlfile, Seagull.BarTender.Print.XMLSourceType.ScriptFile)






    End Sub



    PS.: The XML file, TEXT data file, and the BTW file are attached in previous reply.

  • Avatar
    Domingo Rodriguez

    Could you confirm:


    1. That the printer make and model you want to use is HP LaserJet 6P, driver version 6.1.7233.0 ?
    2. That when you sent the same BTXML-Script to the same printer directly via BarTender (not via the .NET SDK application) the exported pictures include the text?
    3. That you're running a Trial Edition of BarTender? If so, how many Trial days do you have left? (Check this via the "Help > About" dialog in BarTender).
    4. Do you have this problem with any other printer / printer driver? If no, then try to install a different printer driver (PS, PCL5) for your HP printer and try again.
    5. Just in case the field is empty at the time you try to export, please give it a default value. Do this by double clicking on the text object and now give it a "Sample Data" value.
    6. Is your .NET SDK application running the BarTender processes under a service context?
  • Avatar
    Legacy Poster



    The problem was solved by enter the "Sample Text".


    Thanks ^^


Please sign in to leave a comment.