r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[Printing]

Henrik
13-Sep-2008
[76]
did you solve the center/right adjustment problem?
Dockimbel
13-Sep-2008
[77]
R2 kerning issue with Draw that you were talking about ?
Henrik
13-Sep-2008
[78]
yes
Dockimbel
13-Sep-2008
[79]
It's out of my scope currently, I didn't yet worked on the (cross-platform) 
preview window (where Draw engine will be used).
Henrik
13-Sep-2008
[80]
ok
Dockimbel
13-Sep-2008
[81]
If 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. ;-)
Pekr
13-Sep-2008
[82]
... or ... we can ask Cyphre to fix it? :-)
Dockimbel
13-Sep-2008
[83]
Sure, if he has access to that part of the source code. Henrik, did 
you made a RAMBO ticket for that issue ?
Henrik
13-Sep-2008
[84x2]
no, I stopped spending time on it almost immediately after learning 
of this problem.
the 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.
Dockimbel
16-Sep-2008
[86x3]
Update 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.
To view the PS file, use ghostscript / gsview.
Scaling, auto-fit are also currently missing in the PS version. Landscape 
mode is also missing in both GDI and PS modes.
Graham
16-Sep-2008
[89x2]
don't bother with underline style!  It's a relic of type setting.
There are a few good justifications schemes available for postscript
Dockimbel
16-Sep-2008
[91]
I 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.
Graham
16-Sep-2008
[92]
word wrap or line wrap?
Dockimbel
16-Sep-2008
[93]
line wrap
Graham
16-Sep-2008
[94]
there's also a very nice bar code generator for postscript.
Dockimbel
16-Sep-2008
[95x3]
That 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.
Btw, I need to make a bar code generator for my current project, 
so that's something I'll work on soon.
(only EAN 13 support)
Graham
16-Sep-2008
[98]
http://www.terryburton.co.uk/barcodewriter/is the one I use ....
Dockimbel
16-Sep-2008
[99]
Nice library, thanks for the link.
Henrik
16-Sep-2008
[100x2]
I wrote a simple one that is available through rebol.org.
called ean13.r.. although I don't remember if that specific one has 
PS support.
Dockimbel
17-Sep-2008
[102]
Thanks Henrik, I'll study your code too.
Dockimbel
29-Sep-2008
[103x2]
Did anyone experimented with the printer:// scheme on Windows ? Any 
feedback ?
I'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 ;-).
Gregg
29-Sep-2008
[105]
I hoped to have time Doc, but I don't have a need, and I seem to 
have *no* spare time for playing right now. :-(
Graham
29-Sep-2008
[106x3]
I've been pretty flat out as well, but will have a ook at it today. 
 Thanks for the work.
First 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.
This is the same for all of the three lower text boxes
Dockimbel
29-Sep-2008
[109x2]
It happens here too,  I need to apply global scaling to text fonts 
too.
and not use pair! for specifying X Y scaling values but decimal! 
values.
Graham
29-Sep-2008
[111]
So, this implementation is as a page description language?
Dockimbel
29-Sep-2008
[112x2]
you use commands like 'start-page/end-page to control paging and 
'insert port [...draw dialect...] to draw content.
'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
[124x2]
Sure ..
What I tried to do was create a print template that the user can 
define.