Exportpreviewtoimage Help Follow

0
Avatar
Legacy Poster

Hello,

I am using 10.0 SR4. I cannot get Bartender to export a jpg via xml using any sort of database, query prompt, anything. When using query prompt combined with a stored procedure, no matter what other tags I use it still asks for the data with a manual prompt. Recently I tried using textdata. It errors saying that the element is not expected. Here's what I have using textdata. I copied it from another post and added my own data. Please help me!

3 comments

0
Avatar
Legacy Poster
Comment actions Permalink

Anything?

0
Avatar
Shotaro Ito
Comment actions Permalink

<TextData> only works within <Print> tag's <RecordSet>, not working with preview.

so... if you just want to make preview only, that is a little bit difficult. Like your xml, if you want to both print and preview image, you could do like this. (don't close document and run preview.)

Note that if you save the document after job, the setting (disable prompt by <EnablePrompting>false</EnablePrompting>) would saved in the document.

<?xml version="1.0"?>
<XMLScript Version="2.0">
  <Command>
    <Print>
      <Format>C:\Temp\Commander\Documents\WithPrompt.btw</Format>

      <PrintSetup>
        <EnablePrompting>false</EnablePrompting>
      </PrintSetup>

      <RecordSet Name="Text File 1" Type="btTextFile" AddIfNone="true">
        <Delimitation>btDelimQuoteAndComma</Delimitation>
        <UseFieldNamesFromFirstRecord>true</UseFieldNamesFromFirstRecord>
        <TextData>
          <![CDATA[
"ID","DATA","FMT"
"T000","Hello world","withprompt.btw"
]]>
        </TextData>
      </RecordSet>
    </Print>

    <ExportPrintPreviewToImage ReturnImageInResponse="true">
      <Folder>C:\Temp\Commander\</Folder>
      <FileNameTemplate>Preview_Label%PageNumber%.jpg</FileNameTemplate>
      <ImageFormatType>JPG</ImageFormatType>
      <Colors>btColors24Bit</Colors>
      <DPI>300</DPI>
      <Overwrite>true</Overwrite>
      <IncludeMargins>true</IncludeMargins>
      <IncludeBorder>true</IncludeBorder>
      <BackgroundColor>16777215</BackgroundColor>
    </ExportPrintPreviewToImage>

  </Command>

</XMLScript>
0
Avatar
Legacy Poster
Comment actions Permalink

Yes I eventually arrived at that, although I did not know about the enable prompting tag. Thank you very much for your help!

Please sign in to leave a comment.