当前位置:网站首页>JS tutorial - printing stickers / labels using the electronjs desktop application
JS tutorial - printing stickers / labels using the electronjs desktop application
2022-06-26 16:22:00 【Knowledge fatness】
In this paper , We will discuss how to use Vue-ElectronJS Desktop applications print specific sizes ( such as 10" X 10") Stickers for
We see the product information label on the product , With product and price information . Or there are many industries that are testing products , The test application creates a sticker based on its results , And stick the sticker on the tested product .
How these prints are generated and printed on stickers ?
We will see this in this article .
We are using with ElectronJS Of VueJS To build our application . because ElectronJS Enables us to create desktop applications , It also has built-in... For creating print statements and returning their results API.
Print plain text VS Print HTML Content
When you want to print plain text , You can give commands directly from the main window . however , When you want to print custom HTML Design content , You must create a new window , You will present HTML Content , Then issue a command to print content on this page .
In this paper , We will explore printing HTML The second choice of content .
By default ,ElectronJS Create a separate window , It is sufficient when you want to render application content , But when we want to print custom / Dynamic data , We must have another window to render the data .
Let's configure another window :
In your main renderer file , Usually located in –src/main/index.js, You will notice that the main window is defined here , Let's define another window to render the print
const printerWindow = new BrowserWindow({
show: false,
webPreferences: {
webSecurity: false,
nodeIntegratio边栏推荐
- 了解下常见的函数式接口
- "C language" question set of ⑩
- 【207】Apache崩溃的几个很可能的原因,apache崩溃几个
- stm32h7b0替代h750程序导致单片机挂掉无法烧录程序问题
- 1-12vmware adds SSH function
- R language uses cor function to calculate the correlation matrix for correlation analysis, uses corrgram package to visualize the correlation matrix, reorders rows and columns using principal componen
- 当一个程序员一天被打扰 10 次,后果很惊人!
- 若依微服务特殊字符串被过滤的解决办法
- Dialogue with the senior management of Chang'an Mazda, new products will be released in Q4, and space and intelligence will lead the Japanese system
- 【毕业季】致毕业生的一句话:天高任鸟飞,海阔凭鱼跃
猜你喜欢

Anaconda3 installation tensorflow version 2.0 CPU and GPU installation, win10 system

TCP拥塞控制详解 | 1. 概述

C# 读写文件从用户态切到内核态,到底是个什么流程?

1-12vmware adds SSH function

李飞飞团队将ViT用在机器人身上,规划推理最高提速512倍,还cue了何恺明的MAE...

How to identify contractual issues
![[Li Kou brush questions] 11 Container holding the most water //42 Rain water connection](/img/45/1e712300ea655856762394fba09066.png)
[Li Kou brush questions] 11 Container holding the most water //42 Rain water connection

How to create your own NFT (polygon) on opensea

Angel 3.2.0 new version released! Figure the computing power is strengthened again

Oilfield exploration problems
随机推荐
How to implement interface current limiting?
Exquisite makeup has become the "soft power" of camping, and the sales of vipshop outdoor beauty and skin care products have surged
11 introduction to CNN
3. Keras version model training
100+ data science interview questions and answers Summary - basic knowledge and data analysis
Tencent Peking University's sparse large model training acceleration program het was selected into the VLDB of the international summit
IAR工程适配GD32芯片
Redis migration (recommended operation process) 1
用Attention和微调BERT进行自然语言推断-PyTorch
Notes on key review of software engineering at the end of the term
JS教程之使用 ElectronJS、VueJS、SQLite 和 Sequelize ORM 从 A 到 Z 创建多对多 CRUD 应用程序
Cloud platform monitoring system based on stm32+ Huawei cloud IOT design
最小二乘系统辨识课 中篇:递归最小二乘
Mono 的一些实例方法
【时间复杂度和空间复杂度】
Lifeifei's team applied vit to the robot, increased the maximum speed of planning reasoning by 512 times, and also cued hekaiming's Mae
Quickly get started with federal learning -- the practice of Tencent's self-developed federal learning platform powerfl
I regard it as a dry product with a monthly income of more than 30000 yuan for sidelines and more than 10000 yuan for novices!
(1) Keras handwritten numeral recognition and recognition of self written numbers
NFT transaction principle analysis (2)