打印按钮不能在LiveCycle Html5表单中工作

时间:2016-02-08 20:01:06

标签: html5 livecycle

我有一个已转换为Html5表单的pdf表单。在转换中,我将打印按钮拖动到生成此代码的表单:

import os

#Top level of tree you wish to delete empty directories from.
currentDir = r'K:\AutoCAD Drafting Projects\USA\TX\Image Archive'

index = 0

for root, dirs, files in os.walk(currentDir):
    for dir in dirs:
        newDir = os.path.join(root, dir)
        index += 1
        print str(index) + " ---> " + newDir

        try:
            os.removedirs(newDir)
            print "Directory empty! Deleting..."
            print " "
        except:
            print "Directory not empty and will not be removed"
            print " "

问题是点击时它没有做任何事情。当它是PDF格式时它确实有效。

1 个答案:

答案 0 :(得分:2)

所以xfa.host.print()不在list of methods supported by HTML5 Mobile Forms上,但有一种解决方法。试试这段代码:

if ( xfa.host.appType == "HTML 5" )
{
    window.print();
}
else
{
    xfa.host.print(1, "0", (xfa.host.numPages -1).toString(), 0, 0, 0, 0, 0);
}