Printing Framework

Hello,

I want ot know where I can found info to the printing framework? in Phoenix is there something new about it?

···

--

Saludos / Best regards

Mario Lacunza
Email:: mlacunza@gmail.com
Personal Website:: http://www.lacunza.biz/
Hosting:: http://mlv-host.com/
Mascotas Perdidas:: http://mascotas-perdidas.com/
Google Hangouts / / Skype: mlacunzav

Hi Mario,

···

On Wednesday, November 5, 2014 2:44:22 PM UTC-6, Mario Lacunza wrote:

Hello,

I want ot know where I can found info to the printing framework? in
Phoenix is there something new about it?

I do not think there is anything “new” about the print framework in Phoenix. I think it is either the same or it has not been ported yet. I’m not sure of its status.

  • Mike

Hi Mike,

Yes! I suppose the same.. but I want to know if thats true...

Anyways printing framework is good enough for any report? or better is reportlab?

Saludos / Best regards

Mario Lacunza
Email:: mlacunza@gmail.com
Personal Website:: http://www.lacunza.biz/
Hosting:: http://mlv-host.com/
Mascotas Perdidas:: http://mascotas-perdidas.com/
Google Hangouts / / Skype: mlacunzav

···

El 05/11/14 a las 16:13, Mike Driscoll escribió:

Hi Mario,

On Wednesday, November 5, 2014 2:44:22 PM UTC-6, Mario Lacunza wrote:

    Hello,

    I want ot know where I can found info to the printing framework? in
    Phoenix is there something new about it?

I do not think there is anything "new" about the print framework in Phoenix. I think it is either the same or it has not been ported yet. I'm not sure of its status.

- Mike

I haven’t used it myself. I have used reportlab and I can say that it works great. I haven’t found a report I couldn’t make with it.

  • Mike
···

On Wednesday, November 5, 2014 3:19:25 PM UTC-6, Mario Lacunza wrote:

Hi Mike,

Yes! I suppose the same… but I want to know if thats true…

Anyways printing framework is good enough for any report? or better is
reportlab?

Ok thanks Mike for your comments!

Saludos / Best regards

Mario Lacunza
Email:: mlacunza@gmail.com
Personal Website:: http://www.lacunza.biz/
Hosting:: http://mlv-host.com/
Mascotas Perdidas:: http://mascotas-perdidas.com/
Google Hangouts / / Skype: mlacunzav

···

El 05/11/14 a las 16:26, Mike Driscoll escribió:

On Wednesday, November 5, 2014 3:19:25 PM UTC-6, Mario Lacunza wrote:

    Hi Mike,

    Yes! I suppose the same.. but I want to know if thats true...

    Anyways printing framework is good enough for any report? or
    better is
    reportlab?

I haven't used it myself. I have used reportlab and I can say that it works great. I haven't found a report I couldn't make with it.

- Mike

Anyways printing framework is good enough for any report? or better is reportlab?

ReportLab provides A LOT more than the print framework.

But technically, it doesn't support printing at all -- only PDF
generation. Which, of course, the user can always print.

If you want your app to support classic, print-straight-from-the app
printing, you'll need the print framework, but you'll be doing a lot
of work yourself to get the layout etc. right.

You may also want to check out htmlEasyPrinting (something like that,
I'm on a phone). It provides a nice, easy way to get basic layout,
etc. printed up.

-Chris

···

Saludos / Best regards

Mario Lacunza
Email:: mlacunza@gmail.com
Personal Website:: http://www.lacunza.biz/
Hosting:: http://mlv-host.com/
Mascotas Perdidas:: http://mascotas-perdidas.com/
Google Hangouts / / Skype: mlacunzav

El 05/11/14 a las 16:13, Mike Driscoll escribió:
Hi Mario,

On Wednesday, November 5, 2014 2:44:22 PM UTC-6, Mario Lacunza wrote:

   Hello,

   I want ot know where I can found info to the printing framework? in
   Phoenix is there something new about it?

I do not think there is anything "new" about the print framework in Phoenix. I think it is either the same or it has not been ported yet. I'm not sure of its status.

- Mike

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

That’s true, although you can usually find a way to send the PDF to the printer via subprocess.

  • Mike
···

On Thursday, November 6, 2014 10:33:50 AM UTC-6, Chris Barker - NOAA Federal wrote:

Anyways printing framework is good enough for any report? or better is reportlab?

ReportLab provides A LOT more than the print framework.

But technically, it doesn’t support printing at all – only PDF

generation. Which, of course, the user can always print.

If you want your app to support classic, print-straight-from-the app

printing, you’ll need the print framework, but you’ll be doing a lot

of work yourself to get the layout etc. right.

You may also want to check out htmlEasyPrinting (something like that,

I’m on a phone). It provides a nice, easy way to get basic layout,

etc. printed up.

-Chris

indeed -- indeed, it may be time to let teh nightmare of printing directly
from your app die a slow death!

Though I don't know if Windows supports PDF out of the box at this point.
Does the user need to have installed a third-part app (Acrobat Reader, for
instance)? Of course, most people have done that -- it's not an
unreasonable expectation.

-Chris

···

On Thu, Nov 6, 2014 at 8:37 AM, Mike Driscoll <kyosohma@gmail.com> wrote:

That's true, although you can usually find a way to send the PDF to the
printer via subprocess.

--

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov

Windows 8 includes a “modern app”-style PDF reader, where “modern
app” is synonymous with “extremely limited functionality”. I still
install a real reader.

···

Chris Barker wrote:

        On Thu, Nov 6, 2014 at 8:37 AM, Mike

Driscoll kyosohma@gmail.com
wrote:

              That's true, although you can usually find a way to

send the PDF to the printer via subprocess.

          indeed -- indeed, it may be time to let teh nightmare

of printing directly from your app die a slow death!

          Though I don't know if Windows supports PDF out of the

box at this point. Does the user need to have installed a
third-part app (Acrobat Reader, for instance)? Of course,
most people have done that – it’s not an unreasonable
expectation.

-- Tim Roberts, Providenza & Boekelheide, Inc.

timr@probo.com

Well I think in the requirements for softwares made with Python can go the line:

- Needed Acrobat Reader or PDF Reader :slight_smile:

Direct printing is hard to do but in which cases is recommended? or Reportlab dont cover all the format pages sizes?

Saludos / Best regards

Mario Lacunza
Email:: mlacunza@gmail.com
Personal Website:: http://www.lacunza.biz/
Hosting:: http://mlv-host.com/
Mascotas Perdidas:: http://mascotas-perdidas.com/
Google Hangouts / / Skype: mlacunzav

···

El 06/11/14 a las 15:34, Tim Roberts escribió:

Chris Barker wrote:

On Thu, Nov 6, 2014 at 8:37 AM, Mike Driscoll <kyosohma@gmail.com >> <mailto:kyosohma@gmail.com>> wrote:

    That's true, although you can usually find a way to send the PDF
    to the printer via subprocess.

indeed -- indeed, it may be time to let teh nightmare of printing directly from your app die a slow death!

Though I don't know if Windows supports PDF out of the box at this point. Does the user need to have installed a third-part app (Acrobat Reader, for instance)? Of course, most people have done that -- it's not an unreasonable expectation.

Windows 8 includes a "modern app"-style PDF reader, where "modern app" is synonymous with "extremely limited functionality". I still install a real reader.
--
Tim Roberts,timr@probo.com
Providenza & Boekelheide, Inc.
--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+unsubscribe@googlegroups.com <mailto:wxpython-users+unsubscribe@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.

Hi Chris,

···

On Thursday, November 6, 2014 1:28:49 PM UTC-6, Chris Barker wrote:

On Thu, Nov 6, 2014 at 8:37 AM, Mike Driscoll kyos...@gmail.com wrote:

That’s true, although you can usually find a way to send the PDF to the printer via subprocess.

indeed – indeed, it may be time to let teh nightmare of printing directly from your app die a slow death!

Though I don’t know if Windows supports PDF out of the box at this point. Does the user need to have installed a third-part app (Acrobat Reader, for instance)? Of course, most people have done that – it’s not an unreasonable expectation.

-Chris

I did some digging since I wasn’t sure if Windows 8 had PDF support or not. It sure sounds like it has reader support. See http://www.microsoft.com/about/mspreview/windows8/Windows8_RP_Product_guide.pdf for more details. But all the previous versions definitely require the user to install a PDF reader of some sort.

Mike

I know you have a smiley face here, but remember this is not a
Python requirement – it’s a ReportLab requirement. And, as I’m
sure you are aware, you don’t actually need a PDF reader to use
ReportLab. Many folks use ReportLab on a web server, where the
server doesn’t need a reader at all.
It’s not a case of being “recommended” or not. It’s a matter of
what kind of solution you need. The big advantage of a PDF file is
that it can be shipped from place to place and person to person, and
it will print identically on an incredibly wide variety of virtual
and physical printers. With direct printing, you have an awful lot
of operating system dependencies. Printers have such wide
variations that it’s very difficult to come up with an abstraction,
and that’s reflected in the Windows API – it’s not very abstract.
For example, I have a Python app that prints addresses on
envelopes. I’ve had three different printers, and I’ve had to
modify the application each time, using constants that I could only
find because I’m a Win32 guru and knew where to look to find the
driver package. With a PDF, I don’t have to worry about that.
Also, as I said, if you are writing a web service, you simply don’t
have the option of direct printing. PDF is the only way.

···

Mario Lacunza wrote:

-- Tim Roberts, Providenza & Boekelheide, Inc.
    Well I think in the requirements for softwares made with Python

can go the line:

    - Needed Acrobat Reader or PDF Reader   :)

    Direct printing is hard to do but in

which cases is recommended? or Reportlab dont cover all the
format pages sizes?

timr@probo.com

Hello Tim,

Thanks for the answer, reading your last comments about the Windows API, yes I know that! Before to work in Ubuntu Linux I was in Windows and the printer object is a problem in all the programming languages from M$.

My software is a desktop app and will going to print some reports in A4 format and others in littles and specific sizes, so I think I'll need to use the Printing Framework right?

Saludos / Best regards

Mario Lacunza
Email:: mlacunza@gmail.com
Personal Website:: http://www.lacunza.biz/
Hosting:: http://mlv-host.com/
Mascotas Perdidas:: http://mascotas-perdidas.com/
Google Hangouts / / Skype: mlacunzav

···

El 07/11/14 a las 12:35, Tim Roberts escribió:

Mario Lacunza wrote:

Well I think in the requirements for softwares made with Python can go the line:

- Needed Acrobat Reader or PDF Reader :slight_smile:

I know you have a smiley face here, but remember this is not a Python requirement -- it's a ReportLab requirement. And, as I'm sure you are aware, you don't actually need a PDF reader to use ReportLab. Many folks use ReportLab on a web server, where the server doesn't need a reader at all.

Direct printing is hard to do but in which cases is recommended? or Reportlab dont cover all the format pages sizes?

It's not a case of being "recommended" or not. It's a matter of what kind of solution you need. The big advantage of a PDF file is that it can be shipped from place to place and person to person, and it will print identically on an incredibly wide variety of virtual and physical printers. With direct printing, you have an awful lot of operating system dependencies. Printers have such wide variations that it's very difficult to come up with an abstraction, and that's reflected in the Windows API -- it's not very abstract. For example, I have a Python app that prints addresses on envelopes. I've had three different printers, and I've had to modify the application each time, using constants that I could only find because I'm a Win32 guru and knew where to look to find the driver package. With a PDF, I don't have to worry about that.

Also, as I said, if you are writing a web service, you simply don't have the option of direct printing. PDF is the only way.
--
Tim Roberts,timr@probo.com
Providenza & Boekelheide, Inc.
--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+unsubscribe@googlegroups.com <mailto:wxpython-users+unsubscribe@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.

I use reportlab and print things like labels, in different sizes,
and reports and other stuff to A4 and A5 size paper.
Check out ‘reportlab.lib.pagesizes’ for supported sizes.
Werner

···

Hi Mario,

  On 11/7/2014 18:42, Mario Lacunza wrote:

Hello Tim,

    Thanks for the answer, reading your last comments about the

Windows API, yes I know that! Before to work in Ubuntu Linux I
was in Windows and the printer object is a problem in all the
programming languages from M$.

    My software is a desktop app and will going to print some

reports in A4 format and others in littles and specific sizes,
so I think I’ll need to use the Printing Framework right?

Well, Linux basically solved the problem by not addressing at all.
It’s not really clear whether that’s better or worse.
Again, it depends on what you want. You can certainly set the
target size of each page when you create your PDF file, but in a PDF
file that doesn’t really limit anything. Because of the way they’re
created, you can create your PDF with a 1.1" x 0.8" page, and when I
print it on an A4, I can scale it up and it will still print
correctly.
If you don’t want people to have the extra step of firing up a PDF
reader, then you can use direct printing. That means YOU have to
deal with the “select a printer” dialog, and filling your defaults
and your overrides.

···

Mario Lacunza wrote:

-- Tim Roberts, Providenza & Boekelheide, Inc.
    Thanks for the answer, reading your last comments about the

Windows API, yes I know that! Before to work in Ubuntu Linux I
was in Windows and the printer object is a problem in all the
programming languages from M$.

    My software is a desktop app and

will going to print some reports in A4 format and others in
littles and specific sizes, so I think I’ll need to use the
Printing Framework right?

timr@probo.com

Again, it depends on what you want. You can certainly set the target size
of each page when you create your PDF file, but in a PDF file that doesn't
really limit anything. Because of the way they're created, you can create
your PDF with a 1.1" x 0.8" page, and when I print it on an A4, I can scale
it up and it will still print correctly.

I mostly agree with you, but I must point out that this is NOT the case
where precise alignment is important - as with labels or pre-printed
official forms. If you create a PDF that's intended to check the boxes on
a letter-size form, and you load the printer with the same form on A4
paper, you will have alignment issues. Furthermore, if you create a PDF
that aligns with labels or a form, you must 1) deal with the margins
yourself and 2) the user must turn OFF the PDF reader's default "Scale to
page margins" feature. (If you could predict the results of that feature,
it would be great - but different PDF readers use different scaling
algorithms, and I can never get the same results twice.)

All that being said, it is _still_ much easier to design a precise layout
in ReportLab than to deal with device contexts...

If you don't want people to have the extra step of firing up a PDF reader,
then you can use direct printing. That means YOU have to deal with the
"select a printer" dialog, and filling your defaults and your overrides.

I've done both, and I will never (willingly) deal with direct printing
again.

···

On Fri, Nov 7, 2014 at 10:25 AM, Tim Roberts <timr@probo.com> wrote:

Marc Tompkins wrote:

I mostly agree with you, but I must point out that this is NOT the
case where precise alignment is important - as with labels or
pre-printed official forms. If you create a PDF that's intended to
check the boxes on a letter-size form, and you load the printer with
the same form on A4 paper, you will have alignment issues.
Furthermore, if you create a PDF that aligns with labels or a form,
you must 1) deal with the margins yourself and 2) the user must turn
OFF the PDF reader's default "Scale to page margins" feature.

That's an excellent point. The automatic scaling is both a blessing and
a curse. I have a nice set of scripts for doing labels, but if I forget
to turn off the scaling, I end up doing a lot of cursing.

···

--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

    Direct printing is hard to do but in

which cases is recommended? or Reportlab dont cover all the
format pages sizes?

It's not a case of being "recommended" or not.  It's a matter of

what kind of solution you need. The big advantage of a PDF file is
that it can be shipped from place to place and person to person, and
it will print identically on an incredibly wide variety of virtual
and physical printers. With direct printing, you have an awful lot
of operating system dependencies. Printers have such wide
variations that it’s very difficult to come up with an abstraction,
and that’s reflected in the Windows API – it’s not very abstract.
For example, I have a Python app that prints addresses on
envelopes. I’ve had three different printers, and I’ve had to
modify the application each time, using constants that I could only
find because I’m a Win32 guru and knew where to look to find the
driver package. With a PDF, I don’t have to worry about that.

Also, as I said, if you are writing a web service, you simply don't

have the option of direct printing. PDF is the only way.

-- Tim Roberts, ti...@probo.com
Providenza & Boekelheide, Inc.

Actually PDF printing is only “mostly” the same across printers. I discovered this the hard way when I wrote a check generation application with MICR font for part of the check. I got the MICR font exactly where I wanted it on our laser printer but when we’d go to print the check on the real MICR printer, the MICR line was no longer in the right place. You couldn’t tell it by eye, so you’d have to check it with an overlay on the piece of paper. That was a bear to figure out. I think we had a similar issue with OMR marks.

Mike