PDF Python的PDF打印支持 [英] PDF Printing support from Python

查看:104
本文介绍了PDF Python的PDF打印支持的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好......有没有办法直接从Python打印PDF文件

而不安装Acrobat?我了解ReportLab。这是一个python

模块,它可以让你创建几乎任何PDF文档,但我仍然不知道它是否支持打印,所以我在寻找对于一个Python模块,

可以做到这一点。我想要打印一个PDF文件,就像我这样做了。

来自Acrobat。


Daniel。

解决方案

2005-04-22,dcrespo< dc ***** @ gmail.com>写道:

大家好...有没有办法直接从
Python打印PDF文件而不安装Acrobat?


假设您的打印系统设置合理:


os.system(" lpr%s"%filename)

我知道ReportLab。它是一个python模块,可以让你创建几乎任何PDF文档,但我仍然不知道它是否支持打印,所以我正在寻找一个Python模块
可以做到。我想打印一个PDF文件,就像我从Acrobat那样做。




不确定你的意思就像我是这样做是从

Acrobat。


-

Grant Edwards grante哇!我在我的

visi.com超市看到了这些

的EGG EXTENDERS ......我看过

theINSTRUCTIONS ...


嗨Grant Edwards ...


您的解决方案需要先前安装Acrobat。在内部,

操作系统将pdf文件发送到Acrobat PDF驱动程序,然后发送到打印机的是
。所以你必须安装Acrobat。不是吗?

我想避免它安装一个可以做到的模块(也许我是

做梦:()。如果有的话没有解决方案,那我会很伤心:-S


这就是我需要做的事情:

生成216厘米宽,93厘米高的发票(1/3的高度

的信纸尺寸),并按照这些尺寸进行打印。所以,当我在点阵打印机上打印这个页面时,我是b $ b它停在那些93厘米

的高度连续打印。


我尝试了什么:

我手动创建了一个pdf文件这些尺寸,右键单击

pdf文件,然后选择打印。它只能在Windows XP下使用

Acrobat Reader 7.0,但我想要也是从Win98做的。

不幸的是,Win98下没有Acrobat版本(最大值是

5.1)支持这种打印(我是什么的)直到现在才看到。)

打印,但是所有纸张的字母大小:(


任何帮助?还有其他工具吗?任何一个像Cristal Report但是对于Python?

我听说wxPython支持某种报告,但我不知道

它。有谁知道?


Daniel


" dcrespo" <直流***** @ gmail.com>写道:

嗨Grant Edwards ...

您的解决方案需要先前安装Acrobat。在内部,操作系统将pdf文件发送到Acrobat PDF Driver,然后将其发送到打印机。所以你必须安装Acrobat。不是吗?
我想避免它安装一个可以做到这一点的模块(也许我是梦想:()。如果没有解决方案,那么我会非常伤心:-S

这就是我需要做的事情:
生成216厘米宽和93厘米高的发票(信纸尺寸高度的1/3)并且,按照这些尺寸进行打印。所以,当我在点阵式打印机上打印此页面时,它会在93厘米的高度处停止以进行连续打印。

我尝试过:
我用这些尺寸手动创建了一个pdf文件,然后右键单击
pdf文件,然后选择打印。它只能在Windows XP下使用
Acrobat Reader 7.0,但我想从Win98中做到这一点。
不幸的是,Win98下没有Acrobat版本(最大化是
5.1)支持这种打印(我见过的)直到现在。
它打印,但所有纸张的字母大小:(

任何帮助?任何其他工具?任何一个像Cristal Report但是对于Python?
我听说wxPython支持某种报告,但我不知道
它。任何人都知道?

Daniel



当你说OS时,你是否正在谈论MS Windows?在* NIX

(例如,CUPS + ghostview + foomatic),PDF打印不是通过Adobe代码。


您还可以考虑pdf2ps,pdftops和XPDF。

-
ha ******* *****@boeing.com

6-6M21 BCA CompArch设计工程

电话:(425)294-4718


Hi all... Is there a way to print a PDF file directly from Python
without having Acrobat installed? I know about ReportLab. It''s a python
module that lets you create almost any PDF document, but I still don''t
know if it supports printing, so I''m looking for a Python module that
could do it. I want to print a PDF file just like if I were doing it
from Acrobat.

Daniel.

解决方案

On 2005-04-22, dcrespo <dc*****@gmail.com> wrote:

Hi all... Is there a way to print a PDF file directly from
Python without having Acrobat installed?
Assuming your printing system was setup competently:

os.system("lpr %s" % filename)
I know about ReportLab. It''s a python module that lets you
create almost any PDF document, but I still don''t know if it
supports printing, so I''m looking for a Python module that
could do it. I want to print a PDF file just like if I were
doing it from Acrobat.



Not sure what you mean by "just like if I were doing it from
Acrobat".

--
Grant Edwards grante Yow! I have seen these
at EGG EXTENDERS in my
visi.com Supermarket... I have read
theINSTRUCTIONS...


Hi Grant Edwards...

Your solution requires a previous installation of Acrobat. Internally,
the OS is sending the pdf file to the Acrobat PDF Driver and then it is
sent to the printer. So you have to have Acrobat installed. Don''t you?
I want to avoid it installing a module that could do it (maybe I''m
dreaming:( ). If there''s no solution, then I will be very sad :-S

This is what exactly I need to do:
Generate an invoice of 216cm width and 93cm height (1/3 of the height
of a letter paper size), and print it respecting these dimensions. So,
when I print this page on a dot matrix printer, it stops at those 93cm
of height for continuous printing.

What I tried:
I created a pdf file manually with these dimensions, and right-click on
the pdf file, and selected "print". It just work under Windows XP with
Acrobat Reader 7.0, but I want to do it from a Win98 as well.
Unfortunately, there''s no Acrobat version under Win98 (the maximun is
5.1) that supports this kind of printing (what I had seen until now).
It prints, but the all paper at letter size :(

Any help? Any other tools? Any one like Cristal Report but for Python?
I heard that wxPython supports some kind of reporting, but I don''t know
it. Anyone knows?

Daniel


"dcrespo" <dc*****@gmail.com> writes:

Hi Grant Edwards...

Your solution requires a previous installation of Acrobat. Internally,
the OS is sending the pdf file to the Acrobat PDF Driver and then it is
sent to the printer. So you have to have Acrobat installed. Don''t you?
I want to avoid it installing a module that could do it (maybe I''m
dreaming:( ). If there''s no solution, then I will be very sad :-S

This is what exactly I need to do:
Generate an invoice of 216cm width and 93cm height (1/3 of the height
of a letter paper size), and print it respecting these dimensions. So,
when I print this page on a dot matrix printer, it stops at those 93cm
of height for continuous printing.

What I tried:
I created a pdf file manually with these dimensions, and right-click on
the pdf file, and selected "print". It just work under Windows XP with
Acrobat Reader 7.0, but I want to do it from a Win98 as well.
Unfortunately, there''s no Acrobat version under Win98 (the maximun is
5.1) that supports this kind of printing (what I had seen until now).
It prints, but the all paper at letter size :(

Any help? Any other tools? Any one like Cristal Report but for Python?
I heard that wxPython supports some kind of reporting, but I don''t know
it. Anyone knows?

Daniel


When you say "OS", are you talking MS Windows by any chance? On *NIX
(e.g., CUPS+ghostview+foomatic), PDF printing is not via Adobe code.

You could also consider pdf2ps, pdftops, and XPDF.
--
ha************@boeing.com
6-6M21 BCA CompArch Design Engineering
Phone: (425) 294-4718


这篇关于PDF Python的PDF打印支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆