[squeak-dev] Pretty print to printer?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

[squeak-dev] Pretty print to printer?

Kurt Thams
Is there a way to get code pretty-printed in color to a PDF, or some
other way to send it to a printer? (preferably an entire class fileout
at a time)

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Pretty print to printer?

Ian Trudel-2
Hello Kurt,

Perhaps printing is a taboo! I'd love to see more printing features in
Squeak. Morphic includes a basic PostScript support in any morph's
menu "Copy & Print" but also an export feature to generate images
(PNG, Gif, etc). I have tried it with more or less success but it
might just cut it for you. Have a pretty printed "Shout Workspace",
for example, and print it to postscript. It should work fine if it
finds the proper fonts.

http://wiki.squeak.org/squeak/776

Besides, I have heard that Sophie includes a nice printing support but
haven't tried it yet. Not sure how to get started with Sophie anyway.

Ian

2008/11/11 Kurt Thams <[hidden email]>:
> Is there a way to get code pretty-printed in color to a PDF, or some other
> way to send it to a printer? (preferably an entire class fileout at a time)
>
>

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Pretty print to printer?

Michael Rueger-6
Ian Trudel wrote:

> Besides, I have heard that Sophie includes a nice printing support but
> haven't tried it yet. Not sure how to get started with Sophie anyway.

Download it and go through the tutorials :-)
(due to a server outage tutorials aren't accessible currently :-( ).

Re printing:
in Sophie we use Rome with the Cairo as a backend (Rome also support
Balloon as a backend).
Cairo itself has several backends, two being PS and PDF which we use for
printing.

Michael

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Pretty print to printer?

Ian Trudel-2
Thanks for the pointer, Michael. I'll sure take a look at this. Now
alternate download location in the meantime?

Regards,
Ian

2008/11/14 Michael Rueger <[hidden email]>:

> Ian Trudel wrote:
>
>> Besides, I have heard that Sophie includes a nice printing support but
>> haven't tried it yet. Not sure how to get started with Sophie anyway.
>
> Download it and go through the tutorials :-)
> (due to a server outage tutorials aren't accessible currently :-( ).
>
> Re printing:
> in Sophie we use Rome with the Cairo as a backend (Rome also support Balloon
> as a backend).
> Cairo itself has several backends, two being PS and PDF which we use for
> printing.
>
> Michael
>
>

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Pretty print to printer?

Michael Rueger-6
Ian Trudel wrote:
> Thanks for the pointer, Michael. I'll sure take a look at this. Now
> alternate download location in the meantime?

We actually only found out that the tutorials where on that external
server when it went down :-(
True Murphy...

Michael

cbc
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Pretty print to printer?

cbc
In reply to this post by Kurt Thams
In a pane where the code is pretty-printed, you should be able to shift-yellow button get a menu up, and then select 'send contents to printer'.  This should send it to a connected printer.  Of course, just one text pane at a time, and it is assuming that your platform supports it.
 
Alternatively, you can dig into direct printer support by looking at TextPrinter (which that method above calls), or look at the primitive
Form>primPrintHScale: hScale vScale: vScale landscape: aBoolean
which actually does the heavy lifting.
 
Printing isn't taboo - just not used much at all.
 
Chris


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Pretty print to printer?

Ian Trudel-2
Hello, Chris!

Thanks for the tips. The rendering isn't particularly great but it
does produce a printable PDF with readable text. Note to those who
don't know: configure your printer setup (same menu) with a higher bit
depth if you want colours to be rendered.

Ian.

2008/11/14 Chris Cunningham <[hidden email]>:

> In a pane where the code is pretty-printed, you should be able to
> shift-yellow button get a menu up, and then select 'send contents to
> printer'.  This should send it to a connected printer.  Of course, just one
> text pane at a time, and it is assuming that your platform supports it.
>
> Alternatively, you can dig into direct printer support by looking at
> TextPrinter (which that method above calls), or look at the primitive
> Form>primPrintHScale: hScale vScale: vScale landscape: aBoolean
> which actually does the heavy lifting.
>
> Printing isn't taboo - just not used much at all.
>
> Chris
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Pretty print to printer?

Ian Trudel-2
In reply to this post by Michael Rueger-6
Hello, Michael!

I have managed to downwload "Getting Started" tutorial which is all
right to get started with Sophie. However, what I initially had in
mind when I commented on the system was about the developer resources.
Suddenly, when I have seen there were so many packages in the
Monticello repository, I differed my interest. :)

Besides, where should one start with Rome/Cairo? There is indeed many
packages to choose from.

Regards,
Ian

2008/11/14 Michael Rueger <[hidden email]>:

> Ian Trudel wrote:
>
>> Besides, I have heard that Sophie includes a nice printing support but
>> haven't tried it yet. Not sure how to get started with Sophie anyway.
>
> Download it and go through the tutorials :-)
> (due to a server outage tutorials aren't accessible currently :-( ).
>
> Re printing:
> in Sophie we use Rome with the Cairo as a backend (Rome also support Balloon
> as a backend).
> Cairo itself has several backends, two being PS and PDF which we use for
> printing.
>
> Michael
>
>

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Pretty print to printer?

Michael Rueger-6
Ian Trudel wrote:

> I have managed to downwload "Getting Started" tutorial which is all
> right to get started with Sophie. However, what I initially had in
> mind when I commented on the system was about the developer resources.

There isn't really any developer documentation available right now. The
little we have is outdated. We are hoping to make documentation
available on the developer wiki in the near future.

> Besides, where should one start with Rome/Cairo? There is indeed many
> packages to choose from.

All you need for playing with Rome/Cairo is the Rome package (from
SqueakSource or Sophie), the Rome plugin and the Cairo libraries
(included in the Sophie.app).

Michael