What are we speaking of exactly ?
Here are two different features of different level :
1) the composition :
- 1a) compose a document with a given structure and a style sheet
For the structure, think of section / subsection etc...
For the style sheet, think of LaTeX article, book or report.sty
For the composition, think of page layout (when to insert page
break, compose on several columns, wrap text around figures etc...).
High level composition rules for example might forbid to begin a
sub-section at the bottom of a page.
- 1b) compose a document from a sequence of lower level graphics
(including composed paragraph).
The composition rule might be very simple, just compose one item
over the other, insert page break if it does not fit on page.
For composed text, page break can occur at any composed line or
only at a carriage return.
A good example was VisualWorks Document class.
2) the fileout of the composition in pdf format
- 2a) including PDF document structuring conventions (DSC) if ever
they exist at Smalltalk level.
- 2b) without DSC, but only low level graphics
Composing the paragraph also means having all the font metrics
available plus eventually all the kerning rules, plus rules for
inter-word spacing (non speaking of alignment and tabulation options
which should be part of paragraph spec).
Which PDF library is doing what exactly ?
Are the low level Graphics
- entirely PDF library dependent (which would mean no preview via
Smalltalk graphics),
- entirely dialect dependent (using exclusively
VisualPart/Wrapper/GraphicsContext or Morph/Form/Canvas)
- mixed (transformation of PDF graphics into Smalltalk graphics for
preview and/or translation of Smalltak graphics to PDF graphics)
In the last two cases, porting VW <->Squeak/Pharo might not be immediate ;)
What about composition?
Nicolas
2012/5/2 Yanni Chiu <[email protected]>:
> On 02/05/12 10:53 AM, Sean P. DeNigris wrote:
>>
>>
>> Stephan Eggermont wrote
>>>
>>>
>>> Don't you think it would be much less work
>>> to port Christian Haider's work to Pharo?
>>
>>
>> I was thinking the same thing. The usual Smalltalk duplication of effort
>> seems to have been taken to new heights with PDF libs ;-)
>
>
> I've loaded Artefact, browsed the code, tried the demos.
>
> I've not seen the code for PDF4Smalltalk, because I can't figure out how to
> browse it without VW. However, looking at the examples at:
> https://gitorious.org/pdf4smalltalk/pages/Examples
> I get the (possibly mistaken) impression that the two frameworks do slightly
> different things, but the final result is a PDF in both cases.
>
> Looking at the PDFDemos of Artefact, it's clear how text and tables can be
> written. However, looking at the PDF4Smalltalk examples, it looks like you
> have to position the text and tables in your own code. Of course, I may be
> completely wrong about PDF4Smalltalk, since I've not seen the full code
> base.
>
>