[Nottingham] Handwritten Postscript vs. Handwritten PDF (was: "Linux")

Paul Sladen nottingham at mailman.lug.org.uk
Sun Jun 29 16:34:01 2003


  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime@docserver.cac.washington.edu for more info.

--22049865-1529646295-1056900334=:7287
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
Content-ID: <Pine.LNX.4.21.0306291625461.7287@starsky.19inch.net>

On Thu, 22 May 2003, Jon Masters wrote:
> On Thu, 22 May 2003, Simon Huggins wrote:
> > On Thu, May 22, 2003 at 04:00:53PM +0100, Jon Masters wrote:
> > > I maintain mine in PDF because it is a universally standardised format
> > That's very clever of you Jon.  You mean you write raw PDF yourself?
> I use a tool to convert from postscript.  [...]
> 
> %!PS-Adobe-2.0
> %%Creater: Jon Masters. Copyleft (C) 2003 HIAG Corp(TM).
> %%Title: huggie_is_a_gimp.ps
> 
> Sorry to the rest of you but if Simon will be /that/ pedantic...

Bzzzzzzt!  Please don't call people Gimps!  (Unless they are image editors).

---begin file---
%PDF-1.0
%% cos JCM is fatter;  Sladen is l33ter
%% and maybe Huggie will give me some work in return.
%% First, start at the top of the tree (Root Object)
1 0 obj
<< /Type /Catalog
   /Pages 5 0 R
>> endobj

% Damned niceties you just don't need in Postscript *sigh*
2 0 obj
<< /Type /Page
   % A4 @ 72pt/in
   /MediaBox [0 0 596 840]
   /Resources
   << /ProcSet [/PDF /Text]
      /Font <<  /F 3 0 R  >>
   >>
   /Contents 4 0 R
   % Acroread wants this line, everything else reads it fine without
   /Parent 5 0 R
>> endobj

% Setup a font (grab one of the 13 built-in ones)
3 0 obj
<< /Type /Font
   /Subtype /Type1
   /BaseFont /Helvetica-Bold
>> endobj

% /Content stream where we get to knock JCM :-)
4 0 obj
<< /Type /Content
   /Length 54 >>
   % findfont, scalefont, moveto, string, fill
stream
BT /F 48 Tf 26 420 Td (JCM is not l33t enough!) Tj ET
endstream
endobj

% Seems the spec says this can't be inlined into the /Catalog
5 0 obj
<< /Type /Pages
   /Count 1
   /Kids [2 0 R]
>>
endobj

% and now all the xref LUT crap;
% Gawd, I hate binary offsets in ASCII files...
%
% To regenerate the xref table after fiddling above, use a script!
% --I've attached the perl that I hacked up for the job]
xref
0 6
0000000000 65535 f 
0000000156 00000 n 
0000000268 00000 n 
0000000579 00000 n 
0000000709 00000 n 
0000000940 00000 n 
trailer
<< /Size 6 /Root 1 0 R >>
startxref
1211
%%EOF
---end file---

In case the line-endings, or spacing gets buggered up, I've also attached it
to the email so that you can read it separately, along with a script to
repair it you want to play.  [``$ ./xref.pl < file.pdf > file-xref.pdf'']

Enjoy, AICM5P.  =-)

	-Paul

PS.  How many of you thought PDF documents were just binary files?...
-- 
War is inconsistent with Truth.  Nottingham, GB

--22049865-1529646295-1056900334=:7287
Content-Type: APPLICATION/PDF; NAME="jcm-xref.pdf"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.21.0306291625340.7287@starsky.19inch.net>
Content-Description: 
Content-Disposition: ATTACHMENT; FILENAME="jcm-xref.pdf"

JVBERi0xLjAKJSUgY29zIEpDTSBpcyBmYXR0ZXI7ICBTbGFkZW4gaXMgbDMz
dGVyCiUlIGFuZCBtYXliZSBIdWdnaWUgd2lsbCBnaXZlIG1lIHNvbWUgd29y
ayBpbiByZXR1cm4uCiUlIEZpcnN0LCBzdGFydCBhdCB0aGUgdG9wIG9mIHRo
ZSB0cmVlIChSb290IE9iamVjdCkKMSAwIG9iago8PCAvVHlwZSAvQ2F0YWxv
ZwogICAvUGFnZXMgNSAwIFIKPj4gZW5kb2JqCgolIERhbW5lZCBuaWNldGll
cyB5b3UganVzdCBkb24ndCBuZWVkIGluIFBvc3RzY3JpcHQgKnNpZ2gqCjIg
MCBvYmoKPDwgL1R5cGUgL1BhZ2UKICAgJSBBNCBAIDcycHQvaW4KICAgL01l
ZGlhQm94IFswIDAgNTk2IDg0MF0KICAgL1Jlc291cmNlcwogICA8PCAvUHJv
Y1NldCBbL1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QolIC0tSSd2ZSBhdHRhY2hl
ZCB0aGUgcGVybCB0aGF0IEkgaGFja2VkIHVwIGZvciB0aGUgam9iXQp4cmVm
CjAgNgowMDAwMDAwMDAwIDY1NTM1IGYgCjAwMDAwMDAxNTYgMDAwMDAgbiAK
MDAwMDAwMDI2OCAwMDAwMCBuIAowMDAwMDAwNTc5IDAwMDAwIG4gCjAwMDAw
MDA3MDkgMDAwMDAgbiAKMDAwMDAwMDk0MCAwMDAwMCBuIAp0cmFpbGVyCjw8
IC9TaXplIDYgL1Jvb3QgMSAwIFIgPj4Kc3RhcnR4cmVmCjEyMTEKJSVFT0Y=
--22049865-1529646295-1056900334=:7287
Content-Type: APPLICATION/X-PERL; NAME="xref.pl"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.21.0306291625341.7287@starsky.19inch.net>
Content-Description: 
Content-Disposition: ATTACHMENT; FILENAME="xref.pl"

IyEgL3Vzci9iaW4vZW52IHBlcmwKIyAyMDAzIEp1bmUgOHRoICBQYXVsIFNs
YWRlbiAgPG5vdGx1Zy1wZGZAcGF1bC5zbGFkZW4ub3JnPgp3aGlsZSg8PikK
ewogICAgaWYgKG0vXGQrIFxkKyBvYmovKSB7CgkkYysrOyAkeHJlZiAuPSBz
cHJpbnRmKCIlMDEwZCAlMDVkIG4gXG4iLCAkb2ZmLCAwKTsKICAgIH0KICAg
ICRvZmYgKz0gbGVuZ3RoOwogICAgcHJpbnQ7Cn0KJGMrKzsKJHhyZWYgID0g
InhyZWZcbjAgJGNcbjAwMDAwMDAwMDAgNjU1MzUgZiBcbiR7eHJlZn10cmFp
bGVyXG4iOwokeHJlZiAuPSAiPDwgL1NpemUgJGMgL1Jvb3QgMSAwIFIgPj5c
bnN0YXJ0eHJlZlxuJG9mZlxuJSVFT0YiOwpwcmludCAkeHJlZjsK
--22049865-1529646295-1056900334=:7287--