GithubHelp home page GithubHelp logo

Comments (7)

huanent avatar huanent commented on September 7, 2024

要么都有,要么都没有,应该不会出现少了部分的现象,看下是不是纸张长度设置不够长

from huanent.printer.

longas1232 avatar longas1232 commented on September 7, 2024

不是那种 都有都没有的情况 我看您的代码里是没有对 Graphics资源做Dispose的 但是我们做了Dispose 有的时候其他元素 字体啊 等等正常打印 但是就是二维码丢失了 很奇怪

from huanent.printer.

longas1232 avatar longas1232 commented on September 7, 2024

而且直接发送给 打印机 和 后台打印好像结果也不尽相同 不知道您这方面有经验嘛

from huanent.printer.

huanent avatar huanent commented on September 7, 2024

Graphics资源做Dispose应该是不需要的,打印事件结束后释放PrintDocument时会在内部调用释放。
发送给 打印机 和 后台打印结果不同,因为打印机品牌型号这些各尽不同,所以无法回答

from huanent.printer.

huanent avatar huanent commented on September 7, 2024

资源释放问题可以参见msdn https://docs.microsoft.com/zh-cn/dotnet/api/system.drawing.printing.printdocument?view=netframework-4.8

from huanent.printer.

longas1232 avatar longas1232 commented on September 7, 2024

十分感谢 我尝试不在打印过程中 释放g.graphics资源 而是在Print()方法之后释放 printDocument.dispose方法 但是我观察内存是不断的上涨的 不知道您遇到过这种情况吗?

from huanent.printer.

huanent avatar huanent commented on September 7, 2024

get到print对象后要存成单例复用,2.0没有Print()方法,如果不是用2.0,需要迁移到2.0版本。2.0在finish方法后会释放掉printDocument对象,相应的graphics也会释放

from huanent.printer.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.