REBOL3 - Printing ([web-public])

Return to Index Page
Most recent messages (300 max) are listed first.

#UserMessageDate
166Maximthey are often broken down into "header" & "footer" in software applications.16-Jun-09 16:15
165Geomol"summary" is a good word, thanks!16-Jun-09 9:11
164mhinsonPerhaps "Print job information" or "Print job summary"16-Jun-09 9:05
163GeomolYou can often choose to get this extra info printed as an option in the writing program, Notepad, Word or whatever. Or maybe as an option in the printer config.16-Jun-09 8:48
162Grahamyes, it is16-Jun-09 8:47
161GeomolOr that is more used for text under an image in a book?16-Jun-09 8:46
160Geomol"legend" maybe?16-Jun-09 8:46
159GeomolNah, not really. It's been printed typically on a separate page after the actual print.16-Jun-09 8:45
158Grahamdo you metadata ?16-Jun-09 8:45
157GeomolWhen printing, the user can often choose to have extra info printed with: who ordered the print, date and time, etc. What's the english name for this part of the print? The danish word for it translate to "receipt", but I feel, there's another english word.16-Jun-09 8:44
156GrahamI've uploaded the 35 gnu ttf so that you can use postscript fonts for draw http://rebol.wik.is/Protocols/Printer29-Sep-08 22:52
155Grahammy code of course :(29-Sep-08 22:22
154DockimbelIs it an issue with View/Draw or a bug in your code ?29-Sep-08 22:15
153Grahamie. not always working!29-Sep-08 22:09
152GrahamI have multipage preview working ... some time ... I have a block of draw blocks and I am supposed to switch between them to page thru the different pages.29-Sep-08 22:08
151Grahamthat's an admirable aim ... just beyond my skill set29-Sep-08 22:07
150DockimbelThanks for the food for thought, I think that I could reuse several routines from gonzo. But PS is just a low-level layer for my printer dialect, doing too sophisticated things at PS level is not an option for me. All the calculation and fancy things (like good justification) have to be done in Draw dialect, so that WYSIWYG can be achieved.29-Sep-08 22:06
149Grahamand apologies for the poor formatting ....29-Sep-08 22:05
148Grahamwhich you can strip out .. the preprocessing stuff.29-Sep-08 22:04
147GrahamOk, sent ... it's got lots of stuff specific to my emr app29-Sep-08 22:04
146Grahamie. I allow the template language to include an eps file29-Sep-08 21:51
145Grahamas no idea what it will look like29-Sep-08 21:50
144GrahamFor eps, I just put a yellow box in the print preview ....29-Sep-08 21:49
143Dockimbelok, so it's 100% PS. I wrote a few helping functions in PS too.29-Sep-08 21:47
142Grahamhas to be ... can't hide postscript source!29-Sep-08 21:45
141Grahamyes ...29-Sep-08 21:45
140Dockimbelis gonzo open sourced ?29-Sep-08 21:45
139Grahamgonzo is a postscript utility to do micro justification and other goodies29-Sep-08 21:44
138Dockimbelyou should try to pipe the draw output to the printer scheme29-Sep-08 21:44
137Grahambut it handles rotations and translations poorly29-Sep-08 21:43
136Grahamyes.29-Sep-08 21:43
135DockimbelSo, you have a draw converter for this dialect ?29-Sep-08 21:43
134Grahamthe same dialect gets converted to draw to allow a preview.29-Sep-08 21:42
133Grahamyes, to make it easier to convert to postscript and to draw.29-Sep-08 21:42
132Grahamflowbox 75x150 540x590 float 20

means to put a text box that accepts text that flows into another box, but to start the text inside the box 20 points below any text above it.

29-Sep-08 21:42
131DockimbelLooks like rebolized PostScript29-Sep-08 21:42
130GrahamThis is the "dialect" I am using to generate a multi-page letter. Words like "consult-date" "provider" "My-name" are processed by a pre-processor to substitute the correct variables.29-Sep-08 21:41
129Grahampagesize A4 font Times-BoldItalic 30 linewidth 1 at 190x750 My-Name color (black) font Times-Roman 12 newpath at 75x725 line1 at 75x715 line2 at 75x705 line3 at 445x715 "Ph: " at 465x715 ph at 445x705 "Fx: " at 465x705 fx at 438x680 "Date:" font Times-Bold at 465x680 consult-date font Times-Roman 11 newpath at 75x740 line 530x740 newpath at 75x700 line 530x700 at 75x680 Provider-Template

at 75x600 "Dear " at 100x600 Provider flow-translate 0x0 flowbox 75x150 540x590 float 20 flow-translate 0x0 flowbox 75x150 540x720 gonzo flow consult gonzo flow-translate 0x0 flowbox 75x150 540x720 float 10 flow-translate 0x0 flowbox 75x72 540x720 float 50 showpage

29-Sep-08 21:39
128DockimbelI see, that's the kind of usage that I was thinking about too.29-Sep-08 21:39
127DockimbelThe underlying GDI API I've used does a lot more than needed, I should restrict its behaviour.29-Sep-08 21:38
126GrahamMy printing then uses the print template dialect to print page after page.29-Sep-08 21:37
125GrahamWhat I tried to do was create a print template that the user can define.29-Sep-08 21:37
124GrahamSure ..29-Sep-08 21:37
123DockimbelCould you send me your Draw source code ? (privately or by email, if it's too long)29-Sep-08 21:36
122Grahamand if I run out of text boxes, it just keeps reusing the last text box ... for all subsequent pages29-Sep-08 21:36
121GrahamSo, the text boxes are contained within the one page.29-Sep-08 21:34
120Grahamif the next text box is above the current text box, it assumes a page break and so starts a new page.29-Sep-08 21:34
119GrahamWhat I am doing now is printing the text to a virtual draw page, and then when it reaches the bottom of the text box, it then flows to the next text box.29-Sep-08 21:33
118DockimbelText can only flow inside boxes fully contained inside a page. This is achieved by extending Draw dialect with a new primitive : 'text-box.29-Sep-08 21:32
117DockimbelMaking text flow from one page to another is a job for a word-processor like MSWord or LaTeX. The printer scheme aims to be general purpose, so it can be used to print anything (not only output from word-processors).29-Sep-08 21:30
116GrahamSo, how are you doing it ? multiple pages and text flow?29-Sep-08 21:29
115DockimbelNope, that's too high-level, it's not a feature of Draw dialect. The printer scheme provides a cross-platform low-level layer to build such higher-level frameworks.29-Sep-08 21:25
114GrahamDoes text flow from one page to another?29-Sep-08 21:23
113Dockimbel'end-page might be buggy in your version.29-Sep-08 21:23
112Dockimbelyou use commands like 'start-page/end-page to control paging and 'insert port [...draw dialect...] to draw content.29-Sep-08 21:22
111GrahamSo, this implementation is as a page description language?29-Sep-08 21:19
110Dockimbeland not use pair! for specifying X Y scaling values but decimal! values.29-Sep-08 21:19
109DockimbelIt happens here too, I need to apply global scaling to text fonts too.29-Sep-08 21:17
108GrahamThis is the same for all of the three lower text boxes29-Sep-08 20:58
107GrahamFirst issue .. the text box displays fine in the PDF, but when I print it

write printer:// demo-doc

the lower text box margin cuts into the bottom line of text so that only the top half of that line prints.

29-Sep-08 20:58
106GrahamI've been pretty flat out as well, but will have a ook at it today. Thanks for the work.29-Sep-08 20:25
105GreggI hoped to have time Doc, but I don't have a need, and I seem to have *no* spare time for playing right now. :-(29-Sep-08 14:06
104DockimbelI'm about to release a new version of the printer lib with multiplatform support, so if anyone noticed something to fix or improve that I'm not aware of, that's the right time to report ;-).29-Sep-08 10:49
103DockimbelDid anyone experimented with the printer:// scheme on Windows ? Any feedback ?29-Sep-08 10:46
102DockimbelThanks Henrik, I'll study your code too.17-Sep-08 6:16
101Henrikcalled ean13.r.. although I don't remember if that specific one has PS support.16-Sep-08 22:56
100HenrikI wrote a simple one that is available through rebol.org.16-Sep-08 22:51
99DockimbelNice library, thanks for the link.16-Sep-08 22:01
98Grahamhttp://www.terryburton.co.uk/barcodewriter/ is the one I use ....16-Sep-08 21:59
97Dockimbel(only EAN 13 support)16-Sep-08 21:56
96DockimbelBtw, I need to make a bar code generator for my current project, so that's something I'll work on soon.16-Sep-08 21:54
95DockimbelThat shouldn't be hard to code in PS. Anyway, now I just need to code it in Draw, and let the printer:// scheme do the work.16-Sep-08 21:53
94Grahamthere's also a very nice bar code generator for postscript.16-Sep-08 21:52
93Dockimbelline wrap16-Sep-08 21:52
92Grahamword wrap or line wrap?16-Sep-08 21:51
91DockimbelI found a justification routine (doing also alignement). I need to study it to see if it fit my needs : align and line-wrap at the same time.16-Sep-08 21:50
90GrahamThere are a few good justifications schemes available for postscript16-Sep-08 21:49
89Grahamdon't bother with underline style! It's a relic of type setting.16-Sep-08 21:48
88DockimbelScaling, auto-fit are also currently missing in the PS version. Landscape mode is also missing in both GDI and PS modes.16-Sep-08 21:48
87DockimbelTo view the PS file, use ghostscript / gsview.16-Sep-08 21:47
86DockimbelUpdate on the work-in-progress : http://softinnov.org/tmp/test-page.zip

Both files are printed from the same Draw dialect source, using my printer:// scheme. The PDF file is printed through Bullzip PDF Virtual printer. The PS file is directly generated by the printer scheme (for UNIX/Cups direct printing).

Most of the PostScript support is done (see %test-page.ps), but there's still a lot of details to enhance/fix/add:

o Add center/right alignement support

o Add underline style for fonts

o Fine-tune positionning and bold level.

o Fix minor differences with the GDI version.

16-Sep-08 21:45
85Henrikthe idea was to use size-text to produce the needed position, but the result is not usable, because I don't think DRAW uses the concept of a bounding box for text.13-Sep-08 17:54
84Henrikno, I stopped spending time on it almost immediately after learning of this problem.13-Sep-08 17:50
83DockimbelSure, if he has access to that part of the source code. Henrik, did you made a RAMBO ticket for that issue ?13-Sep-08 17:34
82Pekr... or ... we can ask Cyphre to fix it? :-)13-Sep-08 17:24
81DockimbelIf Draw has really some issue with kerning, I can't see how we can fix that in R2. We'll have to live with an almost-WYSIWYG model. If R2 was open-sourced, that would be, of course, different. ;-)13-Sep-08 16:32
80Henrikok13-Sep-08 16:28
79DockimbelIt's out of my scope currently, I didn't yet worked on the (cross-platform) preview window (where Draw engine will be used).13-Sep-08 16:28
78Henrikyes13-Sep-08 16:26
77DockimbelR2 kerning issue with Draw that you were talking about ?13-Sep-08 16:23
76Henrikdid you solve the center/right adjustment problem?13-Sep-08 16:18
75Dockimbel(oops sorry, wrong window, please ignore my last post)13-Sep-08 16:08
74Dockimbelle blog de Billaut : http://billaut.typepad.com/13-Sep-08 16:07
73Dockimbel;-)13-Sep-08 16:01
72Henriknow it's getting really interesting :-)13-Sep-08 15:59
71DockimbelI know that Geomol has built a PS lib but, unfortunately, it doesn't take Draw dialect as input.13-Sep-08 15:48
70DockimbelFor information, I've successfully tested direct printing in Linux and OS X using PostScript format documents and CUPS as backend. I'm currently trying to implement a Draw dialect compiler targeting PS. Unix and OS X support wasn't needed for my project, but I couldn't resist to give it a try ;-).13-Sep-08 15:46
69Louishttp://www.rebol.org/cgi-bin/cgiwrap/rebol/view-script.r?script=crystal-reports.r9-Sep-08 23:05
68Gregg"who wants to clone Crystal Reports ?"

We would need a /bloat refinement to do that. :-)

9-Sep-08 19:47
67Henrikmine focuses more on the UI side, offering various methods of printing postscript. there is also a printer queue system as well as a printer server.9-Sep-08 12:24
66HenrikI wish I could integrate this with my own printing system, but it's highly postscript oriented.9-Sep-08 12:23
65DockimbelI've looked at the cross-platform aspects of printing. I think that it could be possible to add support for PS and PDF generators for Unix and OSX printing support. So we could have the same dialect to draw on screen and on printers (on all majors platforms).9-Sep-08 11:32
64PavelBut this is the merit, everybody could do it (OK almost everybody, not me for example), but you did it. Printing points up dual problem, first it is definitely against Cross-platformity, but second if anybody intents to work seriously (make real aplications) definitely need it.9-Sep-08 10:11
63DockimbelThanks but this isn't really such a great piece of code (Windows API is doing the real job), even if it fills a gap in REBOL (at least for Windows). Btw, in my company, we're using Gab's pdf-maker for years now to generate and print all our documents. I made this library only because I needed a direct printing solution for a customer and I must admit it was a fun work to do.9-Sep-08 9:31
62PavelIt must be said clearly YOU ARE THE GREAT! thx for this all9-Sep-08 9:16
61DockimbelBtw, it's possible to list the available printers using : probe printer/enum9-Sep-08 9:15
60DockimbelNot currently, but it could be added.9-Sep-08 9:12
59HenrikI'm unable to test it here, but what about bringing up the printer dialog? Does that happen?9-Sep-08 7:11
58DockimbelGregg: I must admit that I missed the good old VB printer object. So now, who wants to clone Crystal Reports ? ;-)9-Sep-08 5:50
57GrahamFantastic!9-Sep-08 4:08
56GreggAwesome Doc! I thought I had forever gotten away from start-doc/end-doc, but I guess old APIs never die. :-)8-Sep-08 23:39
55DockimbelLast but not least, the usual one-liner : write printer:// [text 10x10 "Hello World!"] ;-)8-Sep-08 18:20
54DockimbelI don't think that I will have time to add all those features, so it's left as an exercice for the community ;-).8-Sep-08 18:16
53DockimbelPossible additionnal features :

- Support for preview View window is possible, but requires some fine tuning first in Printer scheme, for WYSIWYG support.

- Support for Windows standard printer dialog window could be added.

- Support for setting page orientation, page copies, etc...could be added.

8-Sep-08 18:15
52DockimbelBtw, the printer dialect use milimeters as unit for positioning and size.8-Sep-08 18:10
51Dockimbelp: open printer:// insert p 'start-doc

insert p 'start-page insert p [text "Page 1" 50x50] insert p 'end-page

insert p 'start-page insert p [text "Page 2" 50x50] insert p 'end-page ... insert p 'end-doc ;-- this one triggers the real printing close p

8-Sep-08 18:08
50DockimbelExample of multiples pages printing :8-Sep-08 18:08
49DockimbelI highly recommand the excellent Bullzip free PDF Printer for testing : http://www.bullzip.com/download/pdf/BullzipPDFPrinter_5_0_0_609.zip8-Sep-08 18:05
48DockimbelBut Draw dialect is really too level for a daily use. A higher level dialect with relative positionning and higher level constructs (e.g. tables support), like VID or HTML is needed.8-Sep-08 18:02
47DockimbelDraw dialect maps very well with Windows drawing API (GDI). It's, in most cases, a one to one mapping.8-Sep-08 17:59
46DockimbelThere's still some glitches and it needs some fine-tuning before providing real WYSIWYG results when compared to Draw rendering.8-Sep-08 17:57
45DockimbelNo docs for now, look at the sample %test-page.r script and at the scheme implementation. Input dialect is a subset of Draw dialect.8-Sep-08 17:55
44DockimbelFirst test release of Printer scheme for direct printing on Windows platforms : http://softinnov.org/tmp/printer.zip8-Sep-08 17:54
43KajI'm very interested in this for both REBOL and Syllable7-Sep-08 20:29
42KajSo would or wouldn't you advise to go through PDF for printing to GhostScript?7-Sep-08 20:28
41BrianHIt wouldn't be the wrapping of the Windows API that would help Linux users, it would be his initial work on making a Draw-like printing dialect. Defining the dialect is a large part of the process of supporting printing in REBOL. There will be non-Windows-specific parts of Doc's implementation that can be adapted to a general printing model for REBOL, one that can have multiple implementations with different backends. For that matter, there would need to be at least 3 backends: GDI (for Windows), Postscript (for Ghostscript) and PDF (for Mac Quartz), with a possible XPS backend as a minor variation on the PDF one.4-Sep-08 23:44
40GrahamSo, we need to continue supporting postscript.4-Sep-08 23:21
39GrahamWrapping the windows printing api doesn't help linux users :)4-Sep-08 23:21
38BrianHWell, if you are using the OS's facilities for printing you are using the API version of the semantics, not necessarily the source. What really matters is the semantics - the source is just a generated representation.4-Sep-08 21:40
37Henrikor perhaps more appropriate, what OpenGL does for displaying 3D graphics on screen.4-Sep-08 21:32
36HenrikI guess what I would want for printers, would be like what HTML does for webbrowsers.4-Sep-08 21:30
35Henrikbut they are not source compatible, are they?4-Sep-08 21:30
34BrianHBut they did converge with existing systems, in semantic model. XPS is not that far off of PDF in semantics.4-Sep-08 21:29
33HenrikAnd I think it sucks that Microsoft choose to invent yet another printer driver mess, rather than converge with existing systems.4-Sep-08 21:27
32HenrikWell, I still think postscript should have become more widespread than it ended up being. And you can't change my opinion on that. :-) I crave standardization. OK, so if postscript was too hardware hungry, then a lighter version could have helped, which is why I wonder why PDF came so late.4-Sep-08 21:26
31BrianHRemember that the procedural model of Postscript meant that a Postscript printer was a computer, and definitely a more powerful and more expensive computer than most people could afford. Even faking Postscript support required a computer of at least the same scale.4-Sep-08 21:22
30BrianHPostscript printers had much more RAM than that, even then.4-Sep-08 21:19
29BrianHWindows 1 ran in 512k or less of RAM, as I recall (likely badly).4-Sep-08 21:18
28BrianHYou know, when they added 80286 support.4-Sep-08 21:17
27BrianHInitial versions of GDI predate Windows 2.4-Sep-08 21:17
26BrianHThat was considered a hard problem on 8086 computers. Remember how far back the "beginning" was...4-Sep-08 21:16
25Henrikno, they would have made postscript rasterizers to make postscript work properly on cheap printers.4-Sep-08 21:13
24BrianHAt the start, postscript printers cost thousands of dollars but dot matrix printers cost a couple hundred. If MS had gone with Postscript, printing would have been stillborn outside of large companies.4-Sep-08 21:12
23HenrikIt might have had problems, but it would have been a much better starting point, had Microsoft embraced postscript from the start. There would have been a common starting point and a much larger incentive for building hardware postscript printers at the time. If that had been done, printer drivers would not be necessary under any platform today, or they would be limited to being postscript rasterizers.4-Sep-08 21:10
22BrianHIt would probably be easier to get AGG to output stuff in a form GDI would like though, with more overhead from pushing around all of that bitmap data of course.4-Sep-08 21:08
21BrianHXPS is like a cleaned-up, extended PDF, with an XML representation if you're into that. The models are similar.4-Sep-08 21:06
20BrianHThat's why Apple based its Quartz model on PDF, when they already had a Postscript model from NeXT.4-Sep-08 21:02
19BrianHThat doesn't even include the execution model change from programmatic (Postscript) to declarative (PDF).4-Sep-08 21:00
18BrianHRead up on the research on PDF sometime before you start promoting Postscript. It is even a good idea to use PDF instead if you are outputting through Ghostscript - it can handle it.4-Sep-08 20:58
17BrianHNo, it would have been horrible. There is a reason that even Adobe has moved away from Postscript - its model has major problems.4-Sep-08 20:57
16DockimbelHere's a nice introduction to XPS : http://msdn.microsoft.com/en-us/library/ms742418.aspx4-Sep-08 20:56
15Henrikit would have been a lot more fun if they just used postscript :-)4-Sep-08 20:56
14BrianHFrom what I can tell, they did a lot of interesting research when they came up with XPS - food for thought.4-Sep-08 20:55
13BrianHIt might make more sense for R3, mostly as a thought experiment to help us decide on the semantics of the REBOL printing model.4-Sep-08 20:54
12DockimbelRigh, gobs being lower level would require less work to map to OS Printing API.4-Sep-08 20:54
11DockimbelI had a quick look at XPS API, but it looked more complicated and required more work than GDI API. There was also the compatibility issue, I needed a solution that would work with any printer. I'll gave a deeper look at XPS latter.4-Sep-08 20:53
10HenrikDocKimbel, you'll find that R2 Draw has kerning problems. Or at least that's what it had the last time I looked. That makes it difficult to center and right align text. This is not an issue in R3.4-Sep-08 20:50
9BrianHThe Gob model is much better-suited to adaptation to printing, IMO.4-Sep-08 20:49
8BrianHFor R3 you might look into the rich text support. I am less familiar with R2's Draw (and that's saying a lot).4-Sep-08 20:49
7DockimbelI also need to add extend Draw dialect with a new command: text-box. It's an improved version of 'text that allow you to define a bouding box, align the text horizontally and vertically and auto-wrap text.4-Sep-08 20:47
6BrianHHave you considered the XPS printing API? I gather the semantic model is much better.4-Sep-08 20:47
5DockimbelQuite well so far. I currently only supports the following Draw commands : text, line, box, font, pen4-Sep-08 20:45
4BrianHHow well does the Draw semantic model map to the Windows printing semantic model?4-Sep-08 20:42
3DockimbelMy library is just a thin layer that maps Draw dialect to Win32 Printing API.4-Sep-08 20:41
2DockimbelI've just built a direct printing library for R2, Windows only. It's a wrapper on Win32 Print API, so it supports all printers. It support a subset of Draw dialect as input. I was needing it to print reports for the project I'm currently working on. It still needs some additionnal work to be released publicly (like adding a port scheme layer for more intuitive usage).4-Sep-08 20:40
1DockimbelThis group is about Printing solutions for REBOL.4-Sep-08 20:39

Return to Index Page