Hello all.
Does anybody know of any print preview solutions for the VisualWorks ? I found few reference for the "document workbench" but can not find any specifics. Does anybody have any idea on ready to use solution for the WYSIWYG document editing and previewing before printing ? Any information is greatly appreciated ! Truly --Mark Pirogovsky _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
We do
- print preview - print to pdf (using a cheap pdf driver) When you print, at the lowest level (not using Document), you just do displayOn: aGc at: aPoint where "aGc" is a Printer graphicsContext. Its just like a window, so you have, for example, a Text and you do aText displayOn: aGc at: aPoint You can just as easily take a window with a view in it and get aGc from that and do aText displayOn: aGc at: aPoint If you have the whole report as a set of Text's and/or Image's, you just have the window fetch the correct set for the current "page". We had a more difficult problem, are reports could be arbitrarily long so we had the report drive the window and had to use Semaphore's to sync things, but its not really all the difficult. If you have used "Document" to create a report, you should be able to copy the Document classes and modify them to use a window if you want to go that way. We didn't, we skipped Document and just drove things directly. Mark Pirogovsky wrote: > Hello all. > > Does anybody know of any print preview solutions for the VisualWorks ? > > I found few reference for the "document workbench" but can not find any > specifics. > Does anybody have any idea on ready to use solution for the WYSIWYG > document editing and previewing before printing ? > > Any information is greatly appreciated ! > > > Truly > > --Mark Pirogovsky > > > _______________________________________________ > vwnc mailing list > [hidden email] > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc > -- Dennis Smith +1 416.798.7948 Cherniak Software Development Corporation Fax: +1 416.798.0948 509-2001 Sheppard Avenue East [hidden email] Toronto, ON M2J 4Z8 sip:[hidden email] Canada http://www.CherniakSoftware.com Entrance off Yorkland Blvd south of Sheppard Ave east of the DVP _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
In reply to this post by Mark Pirogovsky-3
Print Preview is tricky, at least for graphics + text in Windows,
because VW graphics display is not the same on printers as on the screen. Lines don't line up exactly, widths are different etc. Text is worse: there are big differences between font sizes, leading to different line wrapping. We have some hack code and fudge factors to get things closer between different platforms and display media, but even so the differences are painful to look at. An on-screen print preview will thus not be the same as what you print. If you increase the resolution when displaying for print preview you can get a little closer, but then you hit problems because VW can't get a big enough Pixmap to display on. E.g. if your screen is 75dpi and your printer 300dpi, you need to zoom to 400% to display (and can scale back down to make the preview). A full-screen window is around 1MP, so takes 4MB at 32bpp. Displaying that at 400% zoom requires a 64MB Pixmap, which Windows generally doesn't provide: you get a primitiveFailed. You can try to handle this and ask for a smaller Pixmap, building up the full picture by tiling several Pixmaps, but that's hard work and probably leads to inaccuracies along the edges of the tiles. One option is to print by displaying to a screen Pixmap rather than Window, and then print that as a bitmap. Of course you get major pixelization/jaggies and don't use the resolution of the printer, so this is better suited to graphics than text. But at least your screen display is always perfectly WYSIWYG, so you don't even need a separate print preview. Printing to something like PDFCreator is a reasonable fix for some cases, but sadly graphics are further off there than printing directly. Using Cairo may be part of a future solution, although last I heard its font handling wasn't very powerful, making ComposedTexts with formatting changes hard work. The good news is that this has been the situation for many, many years, but just recently VW has started to improve in these areas - at least my ancient support requests on printing are seeing some action, and Cairo is moving forward. All the best, Steve > -----Original Message----- > From: [hidden email] [mailto:[hidden email]] On > Behalf Of Mark Pirogovsky > Sent: 10 September 2009 16:19 > To: Visualworks Mailing List > Subject: [vwnc] Print Preview Solutions for VisualWorks ? > > Hello all. > > Does anybody know of any print preview solutions for the VisualWorks ? > > I found few reference for the "document workbench" but can not find > specifics. > Does anybody have any idea on ready to use solution for the WYSIWYG > document editing and previewing before printing ? > > Any information is greatly appreciated ! > > > Truly > > --Mark Pirogovsky > > > _______________________________________________ > vwnc mailing list > [hidden email] > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
In reply to this post by Mark Pirogovsky-3
How about using external program to handle this. FinePrint does it really well upto any size/ complexity. Ensures you are closest to the print on paper as possible. though this is windows only solution. Guess print to pdf (ps file) on linux or others could work too..
Then automate the ability to pop back the printed pdf/ps... not sure if it will be same as print preview in modify and dynamically reset.. -Skrish
On Thu, Sep 10, 2009 at 6:48 PM, Mark Pirogovsky <[hidden email]> wrote: Hello all. _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
In reply to this post by Mark Pirogovsky-3
We print, then we watch the resulting file - it can take a few seconds (or minutes for very long, 100's of pages) reports to finish. Once the file remains idle for 10sec, we take the file and put it where we want the final result. Mark Pirogovsky wrote: Dennis, -- Dennis Smith +1 416.798.7948 Cherniak Software Development Corporation Fax: +1 416.798.0948 509-2001 Sheppard Avenue East [hidden email] Toronto, ON M2J 4Z8 <a class="moz-txt-link-freetext" href="sip:dennis@CherniakSoftware.com">sip:dennis@... Canada http://www.CherniakSoftware.com Entrance off Yorkland Blvd south of Sheppard Ave east of the DVP _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Free forum by Nabble | Edit this page |