<Exportprintpreviewtoimage> Cannot Print Out Text
Hi, I'm new to BarTender.
I'm trying to print a label using the <Exportprintpreviewtoimage> tag, but the result is the output image only show the barcode but the text.
Attached barcodelist_xml.txt is my xml code.
The barcodelist_data.txt is the text file dataset.
And barcodelist_30-9-2014-15-441.jpg is the output image file.
The manual_test.jpg is the preview from BarTender when design the label.
Please help, thank you very much ^^
For more information, there has no problem if I use the same label file and data text file to print to printer by btEnginee.0
★ BarTender Hero ★
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.0
Hi, attached is the btw file for your information, thanks ^^0
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.0
★ BarTender Hero ★
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"> <Folder>.</Folder> <FileNameTemplate>Preview_Label%PageNumber%.BMP</FileNameTemplate> <ImageFormatType>BMP</ImageFormatType> <Colors>btColors24Bit</Colors> <DPI>300</DPI> <IncludeBorder>true</IncludeBorder> <IncludeMargins>true</IncludeMargins> <Overwrite>true</Overwrite> </ExportPrintPreviewToImage> </Command> </XMLScript>0
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 ?0
Sorry that I may not state the problem clear.
The case is I have a vb.net 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 vb.net 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)
PS.: The XML file, TEXT data file, and the BTW file are attached in previous reply.0
Could you confirm:
- That the printer make and model you want to use is HP LaserJet 6P, driver version 6.1.7233.0 ?
- 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?
- 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).
- 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.
- 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.
- Is your .NET SDK application running the BarTender processes under a service context?
The problem was solved by enter the "Sample Text".