Comments (7)
要么都有,要么都没有,应该不会出现少了部分的现象,看下是不是纸张长度设置不够长
from huanent.printer.
不是那种 都有都没有的情况 我看您的代码里是没有对 Graphics资源做Dispose的 但是我们做了Dispose 有的时候其他元素 字体啊 等等正常打印 但是就是二维码丢失了 很奇怪
from huanent.printer.
而且直接发送给 打印机 和 后台打印好像结果也不尽相同 不知道您这方面有经验嘛
from huanent.printer.
Graphics资源做Dispose应该是不需要的,打印事件结束后释放PrintDocument时会在内部调用释放。
发送给 打印机 和 后台打印结果不同,因为打印机品牌型号这些各尽不同,所以无法回答
from huanent.printer.
资源释放问题可以参见msdn https://docs.microsoft.com/zh-cn/dotnet/api/system.drawing.printing.printdocument?view=netframework-4.8
from huanent.printer.
十分感谢 我尝试不在打印过程中 释放g.graphics资源 而是在Print()方法之后释放 printDocument.dispose方法 但是我观察内存是不断的上涨的 不知道您遇到过这种情况吗?
from huanent.printer.
get到print对象后要存成单例复用,2.0没有Print()方法,如果不是用2.0,需要迁移到2.0版本。2.0在finish方法后会释放掉printDocument对象,相应的graphics也会释放
from huanent.printer.
Related Issues (9)
- 只能打印一行 HOT 4
- 可不可以增加一个打印预览的功能啊 HOT 1
- printer.finish错误 HOT 3
- 有切纸的功能么? HOT 1
- 可以配合telerik report的模板打印吗 HOT 3
- 没有打印出内容来 HOT 1
- 可以支持设置字体吗? HOT 1
- 58mm小票机打印乱码 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from huanent.printer.