跳到主内容

搜索

搜索

Exportpreviewtoimage Help

评论

3 条评论

  • Avatar
    Legacy Poster

    Anything?

    0
  • Avatar
    Shotaro Ito

    <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

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

    0

请先登录再写评论。