Date: Tue, 20 Aug 2002 14:19:55 -0700
Reply-To: "Huang, Ya" <ya.huang@PFIZER.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Huang, Ya" <ya.huang@PFIZER.COM>
Subject: Re: SAS/GRAPH output to PDF - damaged file
Content-Type: text/plain
Out of my curiosity, I compared two pdf files created by
SAS/WIN/V8.2 and SAS/Solaris/V8.2 using textpad, and here is
the result:
Compare: (<)H:\files\My SAS Files\V8\sas-l\junk.pdf (5815 bytes)
with: (>)C:\TEMP\junk.pdf (5889 bytes)
30c30,31
< /MediaBox [0 0 612 792]
---
> /MediaBox [0 0 612
> 792]
40c41,46
< 0.001 g 0.001 G 80.64 730.8 m 80.64 734.4 l S 102 732.72 m 102 730.8 l S
123.36 ......
---
> 0.001 g 0.001 G 80.64 730.8 m 80.64 734.4 l S 102 732.72 m 102
> 730.8 l S 123.36 732.72 m 123.36 730.8 l S 144.72 732.72 m 144.72 730.8 l
S.......
......
The first file is from Unix, and you can see each record each record
takes one single line. The second file is from Windows, and a long record
has been
broken down to many lines. This is caused by the different usage of "CR" and
"LF".
Note also that the total byte number is different (5815 vs 5889).
PDF file is comprised with many objects, each objects has a start byte
number(offset
from 0 - the beginning of the file), and a index table is used to locate
those objects. Therefore, if there is any miss calculation of the start
position,
which in my opinion is the cause of the error message, Acrobat will have
hard time
to locate the object. But obviously, Acrobat is design to have some of
tolerance, so that a slight miss alignment can be corrected on the fly.
Ya
-----Original Message-----
From: Robert Abelson [mailto:rabelson@KAI-RESEARCH.COM]
Sent: Tuesday, August 20, 2002 1:40 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: SAS/GRAPH output to PDF - damaged file
Ya,
I do use SAS for Windows. What you say makes sense. Until I get V9, I guess
I'll just live with the popup. Thank you.
Bob
> -----Original Message-----
> From: Huang, Ya [SMTP:ya.huang@pfizer.com]
> Sent: Tuesday, August 20, 2002 4:26 PM
> To: 'Robert Abelson'; SAS-L@LISTSERV.UGA.EDU
> Subject: RE: SAS/GRAPH output to PDF - damaged file
>
> I guess you use SAS for windows. If so, this is a known
> bug. This message seem to have something to do with "CR/LF". If
> you have SAS for Unix, you may try to run the same code in Unix,
> and very likely you won't see the error. Unix use "CR" only and
> Windows use both "CR" and "LF" for record delimiter. If I
> remember correctly, SI is working on this, and later release (V9?)
> will fix it.
>
> If you don't feel confortable with it, one way to get rid of the
> message is to open the pdf file with acrobat (full version, not
> reader), and save it with the same name.
>
> Ya
>
> -----Original Message-----
> From: Robert Abelson [mailto:rabelson@KAI-RESEARCH.COM]
> Sent: Tuesday, August 20, 2002 1:22 PM
> To: SAS-L@LISTSERV.UGA.EDU
> Subject: SAS/GRAPH output to PDF - damaged file
>
>
> Based on a suggestion from Ya Huang on an earlier thread, I've tried
> outputting some graphs to PDF using device=pdf. When I open the file with
> Adobe Acrobat Reader, a box pops up with the message, "The file is damaged
> but is being repaired." The graph then displays and prints just fine. This
> happened in both Adobe Acrobat Reader v4.0 and v5.0, and only with graphs
> that I produced with SAS/GRAPH. Does anybody know why this is happening?
>
> Bob Abelson
> KAI
> 6001 Montrose Rd.
> Suite 920
> Rockville, MD 20852
> T: 301-770-2730
> F: 301-770-4183
> rabelson@kai-research.com
>
> "Politics should be limited in scope to war, protection of property, and
> the
> occasional precautionary beheading of a member of the ruling class."
> -- P.J. O'Rourke
|