dongshou7903 2011-11-12 17:46
浏览 22
已采纳

如何将页面打印到打印机一次

I have a basic html page generated through php and it prints to a printer after a link click using Ben Nadel's print plugin. However, I don't want the user to print the page again. I tried setting the 'print' link to a negative z-index using jquery after it's being clicked, but the user can refresh the page and reuse the link so it would print again. I also know that I can somehow disable the refresh feature, by modifying what F5 does, but that would't save the day since the user can refresh the page through the url bar, and I can't remove/hide, it as much as I know. It also runs on localhost so the user client and server are on the same side. Even the browser doesn't matter since I could use the one that fits this case.

  • 写回答

1条回答 默认 最新

  • dongyou6768 2011-11-12 17:54
    关注

    And I am not sure the requirement to print only once makes sense: a clever user may print into a PDF printer, and print on paper the "printed" PDF many times. A novice user may legitimately want to print twice or more (e.g. because he sent the printing to the wrong printer).

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 CARSIM前车变道设置
  • ¥50 三种调度算法报错 有实例
  • ¥15 关于#python#的问题,请各位专家解答!
  • ¥200 询问:python实现大地主题正反算的程序设计,有偿
  • ¥15 smptlib使用465端口发送邮件失败
  • ¥200 总是报错,能帮助用python实现程序实现高斯正反算吗?有偿
  • ¥15 对于squad数据集的基于bert模型的微调
  • ¥15 为什么我运行这个网络会出现以下报错?CRNN神经网络
  • ¥20 steam下载游戏占用内存
  • ¥15 CST保存项目时失败