realbasic-nug
[Top] [All Lists]

Re: [ANN] REALbasic PDF

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: [ANN] REALbasic PDF
From: Mark Gavin <mgavin_list at appligent dot com>
Date: Mon, 31 Oct 2005 09:23:12 -0500
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <7F854FFC-BF28-454C-8E6B-262DF2A2FDB5 at unco dot edu> <63739F1E-B8EC-4C72-BBF7-81275E660CDD at realsoftware dot com> <709452F3-0CAA-45E5-9157-FDB032EA83EA at mac dot com>

I took a look at the test.pdf file produced by the "pdf example.rb" project. There are several serious problems which need to be addressed.

Serious Problems that must be fixed :
1. The object references in the cross reference table point to the wrong offsets in the file. 2. The "stream" keyword must not be followed by a single carriage return. It must be followed by a carriage return line feed combination or by a single line feed.
3. The startxref in the document trailer has the wrong value.

Things that really should be fixed :
4. The second line of the file header only specifies four bytes of data whose values are greater then 128. The extra bytes in the header look like they are contributing to the error in item #1. 5. When drawing sequential runs of text to the page; using Begin Text (BT) and End Text (ET) for each drawing occurrence is unnecessary. The stream on page two really only needs one BT/ET pair. 6. Don't keep setting the same fonts and colors over and over again when not making any changes to the font or color settings. 7. The same /Resources dictionary is used for both pages. Even-though, the streams on both pages do not use the same resources.

Stylistic Notes :
8. When drawing multiple lines of text; you may find it more convenient to simply use the TD or Td operators. These are shorthands for moving to the start of the next line instead of setting the Text Matrix (Tm).
9. Extra carriage returns after each "endobj" are unnecessary.
10. The document information dictionary is missing.
11. /F1 and /F2 are the same font duplicated within the file.

If, when opening a PDF file; Acrobat displays the warning that a file is being repaired: this is typically an indication that the document cross reference table is malformed. Acrobat can NOT always repair document which contain malformed cross reference tables. Acrobat does go through a lot of effort to try to repair and display all PDF files; but, it doesn't perform miracles. You need to give any PDF viewer a fighting chance to display your document by at least giving it a valid file. Many third-party PDF consumers will fail at reading this file. For example, the Enfocus Browser application, a low level PDF debugging tool, can not open the test.pdf file.

Regards,

Mark Gavin
Chief Technology Officer
Appligent, Inc.
60 South Lansdowne Avenue
Lansdowne, PA 19050
(610) 284-4006
http://www.appligent.com


Am 28.10.2005 um 15:20 schrieb REAL News:

Toby W. Rush Design releases REALbasic PDF

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>