World: r3wp
[Printing]
older newer | first last |
Dockimbel 29-Sep-2008 [113] | 'end-page might be buggy in your version. |
Graham 29-Sep-2008 [114] | Does text flow from one page to another? |
Dockimbel 29-Sep-2008 [115] | Nope, 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. |
Graham 29-Sep-2008 [116] | So, how are you doing it ? multiple pages and text flow? |
Dockimbel 29-Sep-2008 [117x2] | Making 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). |
Text can only flow inside boxes fully contained inside a page. This is achieved by extending Draw dialect with a new primitive : 'text-box. | |
Graham 29-Sep-2008 [119x4] | What 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. |
if the next text box is above the current text box, it assumes a page break and so starts a new page. | |
So, the text boxes are contained within the one page. | |
and if I run out of text boxes, it just keeps reusing the last text box ... for all subsequent pages | |
Dockimbel 29-Sep-2008 [123] | Could you send me your Draw source code ? (privately or by email, if it's too long) |
Graham 29-Sep-2008 [124x3] | Sure .. |
What I tried to do was create a print template that the user can define. | |
My printing then uses the print template dialect to print page after page. | |
Dockimbel 29-Sep-2008 [127x2] | The underlying GDI API I've used does a lot more than needed, I should restrict its behaviour. |
I see, that's the kind of usage that I was thinking about too. | |
Graham 29-Sep-2008 [129x2] | pagesize 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 |
This 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. | |
Dockimbel 29-Sep-2008 [131] | Looks like rebolized PostScript |
Graham 29-Sep-2008 [132x3] | flowbox 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. |
yes, to make it easier to convert to postscript and to draw. | |
the same dialect gets converted to draw to allow a preview. | |
Dockimbel 29-Sep-2008 [135] | So, you have a draw converter for this dialect ? |
Graham 29-Sep-2008 [136x2] | yes. |
but it handles rotations and translations poorly | |
Dockimbel 29-Sep-2008 [138] | you should try to pipe the draw output to the printer scheme |
Graham 29-Sep-2008 [139] | gonzo is a postscript utility to do micro justification and other goodies |
Dockimbel 29-Sep-2008 [140] | is gonzo open sourced ? |
Graham 29-Sep-2008 [141x2] | yes ... |
has to be ... can't hide postscript source! | |
Dockimbel 29-Sep-2008 [143] | ok, so it's 100% PS. I wrote a few helping functions in PS too. |
Graham 29-Sep-2008 [144x6] | For eps, I just put a yellow box in the print preview .... |
as no idea what it will look like | |
ie. I allow the template language to include an eps file | |
Ok, sent ... it's got lots of stuff specific to my emr app | |
which you can strip out .. the preprocessing stuff. | |
and apologies for the poor formatting .... | |
Dockimbel 29-Sep-2008 [150] | Thanks 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. |
Graham 29-Sep-2008 [151x3] | that's an admirable aim ... just beyond my skill set |
I 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. | |
ie. not always working! | |
Dockimbel 29-Sep-2008 [154] | Is it an issue with View/Draw or a bug in your code ? |
Graham 29-Sep-2008 [155x2] | my code of course :( |
I've uploaded the 35 gnu ttf so that you can use postscript fonts for draw http://rebol.wik.is/Protocols/Printer | |
Geomol 16-Jun-2009 [157] | When 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. |
Graham 16-Jun-2009 [158] | do you metadata ? |
Geomol 16-Jun-2009 [159x3] | Nah, not really. It's been printed typically on a separate page after the actual print. |
legend maybe? | |
Or that is more used for text under an image in a book? | |
Graham 16-Jun-2009 [162] | yes, it is |
older newer | first last |