Xml Print To File Script フォローする

0
Avatar
Legacy Poster

Hi,

 

I want to call a layout with a form and print it to a file without prompting for filename.

 

Is this possible? is there anyway to name the file in script and also auto print the document again?

 

I have tried with script below. I'm using Automation Enterprise 2016.

 

Thanks.

 

 

<?xml version="1.0"?>
<XMLScript Version="2.0">
  <Command>
    <Print>
      <Format>C:\temp\testaflag.btw</Format>
      <PrintSetup>
        <EnablePrompting>false</EnablePrompting>
        <AutoPrintAgain>false</AutoPrintAgain>
      </PrintSetup>
      </Print>
      </Command>
</XMLScript>
 

3 コメント

0
Avatar
Ian Cummings
モデレータ
コメントアクション Permalink

We don't support printing to file via automation.  Why are you wanting to print to file in an automated fashion?

 

As a side note, when printing to PDF, the use of the JobName attribute of the <Print> tag to set the name of the PDF generated.

0
Avatar
Legacy Poster
コメントアクション Permalink

We don't support printing to file via automation.  Why are you wanting to print to file in an automated fashion?

 

As a side note, when printing to PDF, the use of the JobName attribute of the <Print> tag to set the name of the PDF generated.

 

I run BT in remote server (cloud VM) and I want it to generate ZPL file so I can download it on my desktop and print it to local Zebra printers.

 

Does this mean I can't do it via XML? I suppose .NET/COM API is the only solution? Any best practice about using BT in cloud VM to generate ZPL file (no printers connected) would be much appreciated!

 

And another question which is kind of irrelevant: why does printing to file require Print to File License Key while exporting label to image via ExportPrintPreviewToImage() doesn't? Doesn't the latter defeat the purpose of per-printer license?

 

Thank you.

0
Avatar
Ian Cummings
モデレータ
コメントアクション Permalink

In BarTender 2016 we have a sample Visual Studio project in the .NET SDK for automated printing over the internet, like what we have with the Print Portal web app.  Although well commented, as of R2 we don't have any documentation about it.  This should give you the cloud printing ability that you're after.

 

A preview image is not viewed as a print job, for printing purposes it is very limited, that is why we don't control it in the same way.

ログインしてコメントを残してください。