f



Preview suddenly can't handle PS filesYesterday, on my Powerbook running Tiger 10.4, Preview was able to open,and display both PS and PDF files. It handled PS files by popping up a little,window sayi

Yesterday, on my Powerbook running Tiger 10.4, Preview was able to open
and display both PS and PDF files.  It handled PS files by popping up a little
window saying it was converting to PDF, but it worked.

Today, Preview can handle PDF files, but not PS.  When I tell it to open a PS
file,  it almost instantly displays  a little popup window that says:

    File error.
    Couldn't open the file
                                             OK

When I press the OK button, I get another small window that is entirely grey,
except for the title bar that contains the file name (ending with .pdf).  If I then
try to close this popup window, I get the popup that says:

    Do you want to save the changes you made in
    the document "Tune003163.pdf"?
    Your changes will be lost if you don't save them.

The usual three buttons are below this.  If I hit Don't Save, it goes away. But
if I hit the Save button,  I get a popup asking for verification, showing the file
name and other things.  It wants to save the file in Desktop (which was where
the .ps file was,. That's OK with me, so I hit that popup's Save button, I get
yet another popup that says:

    The document "Tune003163.pdf" could
    not be saved as "Tune003163.pdf".

Note that in no case has it actually said what the error was.  In this latter case,
it can't be permissions, because the fact that I'd just copied Tune003163.ps to
the Desktop dir is proof that I can write there.  The .pdf file doesn't appear,
and there's no apparent reason for the failure. Preview is refusing to write the
file, but refuses to tell me why.

Anyone know what I might have broken here?  To my knowledge, I didn't
tweak any of Preview's preferences, and looking around under Library for
files with [Pp]review in their names finds none that have changed in the past
week.

It's presumably something to do with how Preview converts PS to PDF, but
I don't find any hints anywhere how that might be done.

A curiosity is that the menu for opening the .ps file includes something called
ColorSync Utility.  I tried that, and it instantly opened the .ps file, and displayed
it correctly.  The quality is crappy, with all the thin horizontal staff lines (it's
a page of sheet music, as you might guess from the name)) blurred and fuzzy.
I fixed that with Preview by turning off auto-aliasing, but there don't seem to
be any Preferences for ColorSync Utility.  Of course, I'd rather use Preview,
but this test shows that the .ps file isn't somehow damaged.  I also downloaded
several of these files to my linux box, where gv displayed them really nice, but
that's only separate verification that the PS is OK.  It doesn't help make Preview
display them on the Mac PB, which is where I want to see them.

0
John
3/6/2006 7:30:20 PM
comp.sys.mac.apps 21416 articles. 3 followers. xxx613 (1334) is leader. Post Follow

4 Replies
1013 Views

Similar Articles

[PageSpeed] 4

On 2006-03-06 14:30:20 -0500, John Chambers <jcsd@speakeasy.net> said:

> Yesterday, on my Powerbook running Tiger 10.4, Preview was able to open
> and display both PS and PDF files.  It handled PS files by popping up a little
> window saying it was converting to PDF, but it worked.
> 
> Today, Preview can handle PDF files, but not PS.  When I tell it to open a PS
> file,  it almost instantly displays  a little popup window that says:
> 
>     File error.
>     Couldn't open the file
>                                              OK
> 
> When I press the OK button, I get another small window that is entirely grey,
> except for the title bar that contains the file name (ending with 
> .pdf).  If I then
> try to close this popup window, I get the popup that says:
> 
>     Do you want to save the changes you made in
>     the document "Tune003163.pdf"?
>     Your changes will be lost if you don't save them.
> 
> The usual three buttons are below this.  If I hit Don't Save, it goes away. But
> if I hit the Save button,  I get a popup asking for verification, 
> showing the file
> name and other things.  It wants to save the file in Desktop (which was where
> the .ps file was,. That's OK with me, so I hit that popup's Save button, I get
> yet another popup that says:
> 
>     The document "Tune003163.pdf" could
>     not be saved as "Tune003163.pdf".
> 
> Note that in no case has it actually said what the error was.  In this 
> latter case,
> it can't be permissions, because the fact that I'd just copied Tune003163.ps to
> the Desktop dir is proof that I can write there.  The .pdf file doesn't appear,
> and there's no apparent reason for the failure. Preview is refusing to 
> write the
> file, but refuses to tell me why.
> 
> Anyone know what I might have broken here?  To my knowledge, I didn't
> tweak any of Preview's preferences, and looking around under Library for
> files with [Pp]review in their names finds none that have changed in the past
> week.
> 
> It's presumably something to do with how Preview converts PS to PDF, but
> I don't find any hints anywhere how that might be done.
> 
> A curiosity is that the menu for opening the .ps file includes something called
> ColorSync Utility.  I tried that, and it instantly opened the .ps file, 
> and displayed
> it correctly.  The quality is crappy, with all the thin horizontal 
> staff lines (it's
> a page of sheet music, as you might guess from the name)) blurred and fuzzy.
> I fixed that with Preview by turning off auto-aliasing, but there don't seem to
> be any Preferences for ColorSync Utility.  Of course, I'd rather use Preview,
> but this test shows that the .ps file isn't somehow damaged.  I also downloaded
> several of these files to my linux box, where gv displayed them really 
> nice, but
> that's only separate verification that the PS is OK.  It doesn't help 
> make Preview
> display them on the Mac PB, which is where I want to see them.

Are these PS piles that used to work?  If not they may have some 
printer control in them that the PS to PDF converter can't handle.  I 
have managed to create such files in OSX using the "Print" command with 
certain printers.  It's probable just some stuff at the start of the 
file that you could delete with TextEdit (assuming it's not a binary PS 
file).  Can you post the URL of one of these files so others could try?
If it's a file that used to work, try using another account.  If it 
works there, then it is something wrong in a preference file in your 
account.

0
Malcolm
3/6/2006 7:49:14 PM
Malcolm wrote:
> On 2006-03-06 14:30:20 -0500, John Chambers <jcsd@speakeasy.net> said:

> Are these PS piles that used to work?  If not they may have some printer 
> control in them that the PS to PDF converter can't handle.  I have 
> managed to create such files in OSX using the "Print" command with 
> certain printers.  It's probable just some stuff at the start of the 
> file that you could delete with TextEdit (assuming it's not a binary PS 
> file).  Can you post the URL of one of these files so others could try?
> If it's a file that used to work, try using another account.  If it 
> works there, then it is something wrong in a preference file in your 
> account.

As a quick check, I found some .ps files on another machine that date from
late January.  They all failed the same way.  (Of course, "the same way" in
this case is merely a "Can't open file" message, with no clues at all about
the actual error. ;-)

Several of these I distinctly remember downloading to this PB and printing,
so the problem didn't exist then.  Actually, today was the first time I've seen
this problem, and checking with a scattering of .ps files on random days in
February and January results in the same failure every time.  Checks with a
few of them on a nearby linux box shows no problems.

Another check just occurred to me. ... Just a minute. ... Yup; my wife's PB
is set up to feed PS files to Preview, and when I used one of her browsers
(Safari) to download one of these .ps files, Preview pauses briefly with a
"Converting Postscript file to PDF" popup, then displays the page just fine.
The first .ps file took abut 30 sec, and I was a bit worried, but then it worked,
and since then, new ones take only 4 or 5 sec.  No errors at all.

For another check, since I'd been using firefox and opera on my PB, I also
tested some of the same files there with Safari.  The .ps files that worked
via Safari on her PB all failed on mine with the same no-clue popup message.

So it's something local to my PB's copy of Preview.  The same browers manage
download the PS files OK on another PB and a linux box, and the PS files work
find there.  Preview displays them fine on the other PB, but not on mine.

It really looks like I broke something, but I can't find any preferences files  (or
any Preview files other than Cache) that have changed recently.

Any ideas what files or subprocesses Preview might be using that I should
be looking at?


0
John
3/6/2006 10:39:58 PM
On 2006-03-06 17:39:58 -0500, John Chambers <jcsd@speakeasy.net> said:

> Malcolm wrote:
>> On 2006-03-06 14:30:20 -0500, John Chambers <jcsd@speakeasy.net> said:
> 
>> Are these PS piles that used to work?  If not they may have some 
>> printer control in them that the PS to PDF converter can't handle.  I 
>> have managed to create such files in OSX using the "Print" command with 
>> certain printers.  It's probable just some stuff at the start of the 
>> file that you could delete with TextEdit (assuming it's not a binary PS 
>> file).  Can you post the URL of one of these files so others could try?
>> If it's a file that used to work, try using another account.  If it 
>> works there, then it is something wrong in a preference file in your 
>> account.
> 
> As a quick check, I found some .ps files on another machine that date from
> late January.  They all failed the same way.  (Of course, "the same way" in
> this case is merely a "Can't open file" message, with no clues at all about
> the actual error. ;-)
> 
> Several of these I distinctly remember downloading to this PB and printing,
> so the problem didn't exist then.  Actually, today was the first time I've seen
> this problem, and checking with a scattering of .ps files on random days in
> February and January results in the same failure every time.  Checks with a
> few of them on a nearby linux box shows no problems.
> 
> Another check just occurred to me. ... Just a minute. ... Yup; my wife's PB
> is set up to feed PS files to Preview, and when I used one of her browsers
> (Safari) to download one of these .ps files, Preview pauses briefly with a
> "Converting Postscript file to PDF" popup, then displays the page just fine.
> The first .ps file took abut 30 sec, and I was a bit worried, but then 
> it worked,
> and since then, new ones take only 4 or 5 sec.  No errors at all.
> 
> For another check, since I'd been using firefox and opera on my PB, I also
> tested some of the same files there with Safari.  The .ps files that worked
> via Safari on her PB all failed on mine with the same no-clue popup message.
> 
> So it's something local to my PB's copy of Preview.  The same browers manage
> download the PS files OK on another PB and a linux box, and the PS files work
> find there.  Preview displays them fine on the other PB, but not on mine.
> 
> It really looks like I broke something, but I can't find any 
> preferences files  (or
> any Preview files other than Cache) that have changed recently.
> 
> Any ideas what files or subprocesses Preview might be using that I should
> be looking at?

Creating a new account and trying there will tell you if the problem in 
in the system, or something wrong in your accounts\'s files.

0
Malcolm
3/7/2006 12:07:09 AM
Malcolm wrote:
> On 2006-03-06 17:39:58 -0500, John Chambers <jcsd@speakeasy.net> said:

> Creating a new account and trying there will tell you if the problem in 
> in the system, or something wrong in your accounts\'s files.


That showed that it was something within my files.  I found these files:

1083262 -rw-------   1 jc  jc  4961 Mar  9 17:09 Library//Preferences/com.apple.Preview.bookmarks.plist
1083260 -rw-------   1 jc  jc  6859 Mar  9 17:09 Library//Preferences/com.apple.Preview.plist
689529 -rw-------   1 jc  jc  1352 Feb  6 23:17 Library//Preferences/com.apple.Preview.plist.old

Guessing that they might be involved, I moved all three, exited Preview,
and restarted it for a .ps file.  It worked!

As the next test, I again exited Preview.  None of these files had reappeared,
so I moved them back, and started Preview on a .ps file.  It worked!

I checked that none of the files had had their timestamps changed. Since
they hadn't changed, it wasn't anything inside them that caused (or fixed)
the problem.

I moved them away and back again, testing with a new Preview each time,
and the problem never reappeared.  As you can see from the above listing,
from a few minutes ago, they do change sometimes.  But they didn't change
at all on March 7, the day that I did this test and "fixed" the problem.

So I guess I don't know what the problem was, other than it had something
to do with at least one of these files.  But not their contents, since the problem
went away without changing their contents. Not permissions, either, since
those weren't changed.

It's yet another "magical" cure of a problem in a way that makes no sense at all.

It's not a really fun way to waste a couple of days.  And I've documented it in
the project notes, since we don't know what caused it or why it fixed itself,
so we can expect it to happen sporadically in the future.  Probably on client
machines, to maximize the frustration.  But at least we have a magical
incantation that fixes the problem, even if it "doesn't do anything".





0
John
3/10/2006 2:11:16 PM
Reply: