Skip to content
This repository has been archived by the owner on Mar 28, 2024. It is now read-only.

Plugin: Print

Dushusir edited this page Jan 2, 2024 · 16 revisions

EN 【中文文档在下方】

Introduction

Luckysheet Print Plugin

Online experience address: Luckysheet Export Demo

Function

Print the current worksheet or selected range.

Usage

  1. Download the print plugin Download the print plug-in compressed package, unzip the file print.js and the temporary License file SecretKey.txt.

    Address: Luckysheet Plugin Download

  2. Pull latest Origin Code of luckysheet

  3. Put it in the designated directory of the project

    Put print.js in luskysheet/src/expandPlugins/print folder.

  4. Configuration

    The front end of Luckysheet already supports the print button on the toolbar through configuration,Perform the following configuration during project initialization:

luckysheet. create({
     plugins:[{
         name: 'print',
         config:{
            license: 'Your License(content of SecretKey.txt)'
         }
     }]
})
  1. Code packaging

Notice

  • After the experience is complete, please contact sales to purchase a permanent license in time. Replace the License file SecretKey.txt.
  • If you encounter the situation of printing the entire page, it may be that the style file is not imported correctly. Please check the import path of the style file.

ZH

介绍

Luckysheet打印插件

在线体验地址:Luckysheet Print Demo

功能

打印当前worksheet或者选取的范围

使用

  1. 下载打印插件

    下载打印插件压缩包,解压出js文件 print.js 和 临时 License 文件 SecretKey.txt

    地址:Luckysheet 插件下载

  2. 拉取luckysheet最新源码

  3. 放到项目指定位置

    将print.js放到 luskysheet/src/expandPlugins/print 文件夹下

  4. 配置

    luckysheet前端已经在工具栏配置打印按钮了,项目初始化时进行如下相应配置:
    1 options: luckysheet初始化时的配置,具体看文档地址
    2 在options中加入plugins, 具体看plugins说明
    3 在plugins数组中加入打印配置,说明如下:
    4 name: 插件名字,写死为'print',不要变动
    5 config: 打印插件初始化配置对象,目前只有一项配置,说明如下:
    6 license: 激活打印功能的凭证,下载打印插件压缩包,解压后的解压包中SecretKey.txt文件中的字符串

luckysheet.create({
     ...options,
     plugins:[{
         name: 'print',
         config:{
            license: 'Your License(解压包中SecretKey.txt文件中的字符串)'
         }
     }]
})

下面是源码中index.html中的项目初始化例子: image

5.重新打包

注意

  • 体验完成之后,请及时联系销售购买永久License。替换 License 文件 SecretKey.txt。
  • 如果遇到打印整个页面的情况,可能是样式文件没有引入正确,请检查下样式文件的引入路径。
Clone this wiki locally