Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
SPDF
Last updated at 4:56 pm UTC on 16 January 2006
Portable Document Format (PDF)

Two packages on SqueakMap do PDF:

PDFReader by Hans-Martin Mosner says:
Beginnings of a PDF file reader.
Use at your own risk.
General usage:
inspect (PDFReader new scan: (FileStream readOnlyFileNamed: 'harddisk:docs:pdf:PDFSPEC13.PDF'); xrefSectionAndTrailer)
inspect the "Root" entry in that dictionary.
execute "PDFPageMorph new page: (self pageAt: 1); openInWorld"
to see the first page


SPL PDF Library by Initials for Squeak Code says: Write PDF files directly from within Squeak using the PDF Library

Initials for Squeak Code reported on 27 April 2003 that:

I have ported the SPDF Library from VisualWorks to Squeak. It allows to
generate PDF files without the need of external tools.

The latest version has support for text, lines and TIFF images. The
library was developed and extended at SPL WorldGroup for specific
projects, and does what was needed for those projects. It is expected
that the library will continue to be extended over time as feedback is
received from the people using it.

The library is available under a very unrestrictive license, but it is
nevertheless a license. Please read the license at: http://wiki.cs.uiuc.edu/VisualWorks/PDF+Library

Once you have loaded the package from SqueakMap, have a look at
PDFReportingSelfTest class>>test to get an idea of what the framework
can do.


Question: How does the EPS which is generated relate to the PDF?

The answer may be in the Portable Document Format Reference Manual Version 1.3 (this site has several versions of the PDF reference for download)

Paragraph 2.3.1 states that


Adapting the MorphicPostscript support to output PDF shouldn't be too hard. DWH has obtained the Smalltalk port of the Java PDF generation package jPDF http://www.splwg.com/Global/1,1004,50227,00.html. Mail him at mailto:dwighth@ipa.net to obtain a Smalltalk port (note: this port is for vanilla VWNC 3.0).