Ddoc to PDF

Alix Pexton alix.DOT.pexton at gmail.DOT.com
Tue Oct 19 04:03:32 PDT 2010


On 19/10/2010 04:12, BCS wrote:
> Hello Alix,
>
>> Doing a layout for an unstructured stream of text in a fixed width
>> typeface (such as in the link you posted) is quite simple, but - as
>> far as I can fathom - is still beyond the current DDoc. Using variable
>> width typefaces, indentation, borders, emphasis, etc. to try and
>> produce a PDF with the same visual style as that which can be easily
>> achieved using the current HTML macros would be very difficult (though
>> I'm not going to go so far as saying its impossible).
>
> IIRC pdf is built on PS and PS is Turing compleat, you might be able to
> do all the processing in PS and just slap the DDoc content is as data.
>

Hmn, I hadn't thought of that, I looked it up, and it seems that the 
subset of PS in the PDF spec is crippled, it has no "if" or "loop" 
constructs...

But you reminded me that PDFs can embed ActionScript! I'm not sure how 
practical it would be, particularly for large documents, as the whole 
stream would need to be processed in order to view any page, or even 
calculate the number of pages. PDF was designed so that any page could 
be reached and rendered quickly without having to process all the pages 
that came before.

Overall, I think the LaTeX in the middle solution is a far better 
option, especially as it is already working ^^

A...


More information about the Digitalmars-d mailing list