PDF Bug?

R

Ron Kaplan

When selecting multiple worksheets from a workbook, the print|Save as PDF
function sends a print job for each worksheet, numbers the pages correctly,
but the PDF generated only includes the last worksheet's pages.

So, it looks like the worksheets are not being concatenated into a single
print job in the PDF generation process.

Has anyone noticed this problem? I think it is a bug.

Thank you.
 
T

Tom Stiller

Ron Kaplan said:
When selecting multiple worksheets from a workbook, the print|Save as PDF
function sends a print job for each worksheet, numbers the pages correctly,
but the PDF generated only includes the last worksheet's pages.

So, it looks like the worksheets are not being concatenated into a single
print job in the PDF generation process.

Has anyone noticed this problem? I think it is a bug.

Bug or not, there is a workaround. See the thread
<http://groups.google.com/group/microsoft.public.mac.office.excel/browse_
frm/thread/2006596a8a5dc54/493f8c531b6760e1?lnk=st&q=&rnum=1#493f8c531b67
60e1> titled "Print a PDF of an entire workbook?"
 
G

Geoff Lilley

Know what, Ron? I never have before. But now that you mention it, I
just tried it myself. I had a workbook with two worksheets, and I
selected the two worksheets using the SHIFT key. Then, I tried to print
them to my physical printer (HP LaserJet.) No sweat - they both came
out perfectly.

Then, I tried doing what you described - printing the two worksheets as
a PDF. I, too, am only getting the second worksheet selected.

When I go to the "Print" dialog, I had no different result when I chose
"Selection," "Active Sheets," or "Entire Workbook." Same result every
time. When I clicked "Preview," it seems as if the print spooler
created two separate documents.

I also tried creating a PS file, which had the same result.

I don't know if I'd call this a bug so much as a limitation. I suspect
that if you want to do what you're describing, you'd need to have Adobe
Acrobat (TM) the full-fledged product. But I could be wrong. Maybe
this link will help:
http://www.adobe.com/support/techdocs/315086.html


Anyone else want to weigh in on this one?

Best
Geoff
 
G

Geoff Lilley

That is AWESOME, Tom! Even though I didn't originate this post, I will
say that I could personally benefit from this.

Thanks again
Geoff
 
T

Tom Stiller

Geoff Lilley said:
That is AWESOME, Tom! Even though I didn't originate this post, I will
say that I could personally benefit from this.
While functionally the same, the latest version of the perl script is a
bit cleaner. I've included it here:

---------------- cut here -------------------------------
#!/usr/bin/perl

@list = `ls _*`;

foreach $was (@list) {
chop($was); # remove newline
$was =~ /^_(.+)(\.[^\.]+)$/
&& ($name = $1) && ($suf = $2); #split on last '.'
$name =~ s/_$//; # remove trailing '_', if any
$i = 1; # set instance count
while ( -e $name . $mod . $suf ) { # avoid conflicts
$mod = sprintf("[%03d]", $i++);
}
rename($was, $name . $mod . $suf); # rename the file
}
---------------- cut here -------------------------------
 
C

CyberTaz

Yeah, I'll bite :)

The "bug" is in the PDF software, not XL - for a change ;-)

Keep in mind that the PDF writer furnished by Apple in OS X is 'stripped
down, bare bones' implementation - convenient as it may be. It has the same
trouble with many multi-section Word docs because it interprets the section
break [read as "each sheet" in Excel) as an end-of-document indicator. Thus,
multiple PDF files.

I know Acrobat Professional 7.0.8 on the PC creates a single PDF from
multisheet .xls files, but haven't tested it on the Mac. Also can't speak
for versions other than Pro or any of the other PDF generators out there.
 
R

Roger Morris

[snip]
While functionally the same, the latest version of the perl script is a
bit cleaner. I've included it here:

---------------- cut here -------------------------------
#!/usr/bin/perl

@list = `ls _*`;

foreach $was (@list) {
chop($was); # remove newline
$was =~ /^_(.+)(\.[^\.]+)$/
&& ($name = $1) && ($suf = $2); #split on last '.'
$name =~ s/_$//; # remove trailing '_', if any
$i = 1; # set instance count
while ( -e $name . $mod . $suf ) { # avoid conflicts
$mod = sprintf("[%03d]", $i++);
}
rename($was, $name . $mod . $suf); # rename the file
}
---------------- cut here -------------------------------

Tom, I can't get this to work! ie seemingly it does nothing at all - no
remove "_", no rename, hence virtual printer does overwrite any previous
'print' with same name.

Your September 2006 code works just fine. I can't find the fault with
this version.

Anyone else having success or failure with this code?

Permissions are rwxrwxrwx. Location is exactly as previous version.
launchd plist file is unchanged.

Roger
 
T

Tom Stiller

[snip]
While functionally the same, the latest version of the perl script is a
bit cleaner. I've included it here:

---------------- cut here -------------------------------
#!/usr/bin/perl

@list = `ls _*`;

foreach $was (@list) {
chop($was); # remove newline
$was =~ /^_(.+)(\.[^\.]+)$/
&& ($name = $1) && ($suf = $2); #split on last '.'
$name =~ s/_$//; # remove trailing '_', if any
$i = 1; # set instance count
while ( -e $name . $mod . $suf ) { # avoid conflicts
$mod = sprintf("[%03d]", $i++);
}
rename($was, $name . $mod . $suf); # rename the file
}
---------------- cut here -------------------------------

Tom, I can't get this to work! ie seemingly it does nothing at all - no
remove "_", no rename, hence virtual printer does overwrite any previous
'print' with same name.

Your September 2006 code works just fine. I can't find the fault with
this version.

Anyone else having success or failure with this code?

Permissions are rwxrwxrwx. Location is exactly as previous version.
launchd plist file is unchanged.

The most likely problem is that the script file has Mac end-of-line
characters (\r), rather than unix EOLs (\n). If so, you can change them
with the free TextWrangler editor or with
tr "\r" "\n" < MacFile name > UnixFile name

see 'man tr' for more details.
 
R

Roger Morris

Tom Stiller said:
[snip]
While functionally the same, the latest version of the perl script is a
bit cleaner. I've included it here:

---------------- cut here -------------------------------
#!/usr/bin/perl

@list = `ls _*`;

foreach $was (@list) {
chop($was); # remove newline
$was =~ /^_(.+)(\.[^\.]+)$/
&& ($name = $1) && ($suf = $2); #split on last '.'
$name =~ s/_$//; # remove trailing '_', if any
$i = 1; # set instance count
while ( -e $name . $mod . $suf ) { # avoid conflicts
$mod = sprintf("[%03d]", $i++);
}
rename($was, $name . $mod . $suf); # rename the file
}
---------------- cut here -------------------------------

Tom, I can't get this to work! ie seemingly it does nothing at all - no
remove "_", no rename, hence virtual printer does overwrite any previous
'print' with same name.

Your September 2006 code works just fine. I can't find the fault with
this version.

Anyone else having success or failure with this code?

Permissions are rwxrwxrwx. Location is exactly as previous version.
launchd plist file is unchanged.

The most likely problem is that the script file has Mac end-of-line
characters (\r), rather than unix EOLs (\n). If so, you can change them
with the free TextWrangler editor or with
tr "\r" "\n" < MacFile name > UnixFile name

see 'man tr' for more details.

I had forgotten about line endings but correcting them has made no
difference.
On trying to execute the script in Terminal I was getting a "No such
file or directory" until changing the @list = line to
@list = `ls /Users/rm/Desktop/cups-pdf/_*`
Now there are no error messages but no desired results either.

I can still use the first version and shall have to study Perl in order
to do some more analysing.

Roger
 
T

Tom Stiller

Tom Stiller said:
[snip]

While functionally the same, the latest version of the perl
script is a bit cleaner. I've included it here:

---------------- cut here -------------------------------
#!/usr/bin/perl

@list = `ls _*`;

foreach $was (@list) {
chop($was); # remove newline $was =~
/^_(.+)(\.[^\.]+)$/
&& ($name = $1) && ($suf = $2); #split on last '.'
$name =~ s/_$//; # remove trailing '_', if any
$i = 1; # set instance count while (
-e $name . $mod . $suf ) { # avoid conflicts
$mod = sprintf("[%03d]", $i++);
}
rename($was, $name . $mod . $suf); # rename the file
}
---------------- cut here -------------------------------

Tom, I can't get this to work! ie seemingly it does nothing at
all - no remove "_", no rename, hence virtual printer does
overwrite any previous 'print' with same name.

Your September 2006 code works just fine. I can't find the fault
with this version.

Anyone else having success or failure with this code?

Permissions are rwxrwxrwx. Location is exactly as previous
version. launchd plist file is unchanged.

The most likely problem is that the script file has Mac end-of-line
characters (\r), rather than unix EOLs (\n). If so, you can change
them with the free TextWrangler editor or with
tr "\r" "\n" < MacFile name > UnixFile name

see 'man tr' for more details.

I had forgotten about line endings but correcting them has made no
difference. On trying to execute the script in Terminal I was getting
a "No such file or directory" until changing the @list = line to
@list = `ls /Users/rm/Desktop/cups-pdf/_*`
Now there are no error messages but no desired results either.
It looks like your problem is that the working directory is not the
'cups-pdf' directory. You will either have to 'cd' to that directory in
the script or, as I do, put the script in the 'cups-pdf' directory
itself (named .rename_pdf ot hide it from the 'ls').
 
R

Roger Morris

Tom Stiller said:
Tom Stiller said:
(e-mail address removed) (Roger Morris) wrote:


[snip]

While functionally the same, the latest version of the perl
script is a bit cleaner. I've included it here:

---------------- cut here -------------------------------
#!/usr/bin/perl

@list = `ls _*`;

foreach $was (@list) {
chop($was); # remove newline $was =~
/^_(.+)(\.[^\.]+)$/
&& ($name = $1) && ($suf = $2); #split on last '.'
$name =~ s/_$//; # remove trailing '_', if any
$i = 1; # set instance count while (
-e $name . $mod . $suf ) { # avoid conflicts
$mod = sprintf("[%03d]", $i++);
}
rename($was, $name . $mod . $suf); # rename the file
}
---------------- cut here -------------------------------

Tom, I can't get this to work! ie seemingly it does nothing at
all - no remove "_", no rename, hence virtual printer does
overwrite any previous 'print' with same name.

Your September 2006 code works just fine. I can't find the fault
with this version.

Anyone else having success or failure with this code?

Permissions are rwxrwxrwx. Location is exactly as previous
version. launchd plist file is unchanged.

The most likely problem is that the script file has Mac end-of-line
characters (\r), rather than unix EOLs (\n). If so, you can change
them with the free TextWrangler editor or with
tr "\r" "\n" < MacFile name > UnixFile name

see 'man tr' for more details.

I had forgotten about line endings but correcting them has made no
difference. On trying to execute the script in Terminal I was getting
a "No such file or directory" until changing the @list = line to
@list = `ls /Users/rm/Desktop/cups-pdf/_*`
Now there are no error messages but no desired results either.
It looks like your problem is that the working directory is not the
'cups-pdf' directory. You will either have to 'cd' to that directory in
the script or, as I do, put the script in the 'cups-pdf' directory
itself (named .rename_pdf ot hide it from the 'ls').

Yes. Thank you Tom. With a chdir in the script all is well.

Roger
 
R

Ron Kaplan

So, I have read the list of interesting ideas to remediate this bug. There.
I said it. It is a bug. The fact that the PDF driver treats each print job
as a separate job is by design and appropriate.

The Microsoft folks need to concatenate these jobs into one print file.

Is anyone from this newsgroup able to pass this on?

Thank you.


Tom Stiller said:
(e-mail address removed) (Roger Morris) wrote:


[snip]

While functionally the same, the latest version of the perl
script is a bit cleaner. I've included it here:

---------------- cut here -------------------------------
#!/usr/bin/perl

@list = `ls _*`;

foreach $was (@list) {
chop($was); # remove newline $was =~
/^_(.+)(\.[^\.]+)$/
&& ($name = $1) && ($suf = $2); #split on last '.'
$name =~ s/_$//; # remove trailing '_', if any
$i = 1; # set instance count while (
-e $name . $mod . $suf ) { # avoid conflicts
$mod = sprintf("[%03d]", $i++);
}
rename($was, $name . $mod . $suf); # rename the file
}
---------------- cut here -------------------------------

Tom, I can't get this to work! ie seemingly it does nothing at
all - no remove "_", no rename, hence virtual printer does
overwrite any previous 'print' with same name.

Your September 2006 code works just fine. I can't find the fault
with this version.

Anyone else having success or failure with this code?

Permissions are rwxrwxrwx. Location is exactly as previous
version. launchd plist file is unchanged.

The most likely problem is that the script file has Mac end-of-line
characters (\r), rather than unix EOLs (\n). If so, you can change
them with the free TextWrangler editor or with
tr "\r" "\n" < MacFile name > UnixFile name

see 'man tr' for more details.

I had forgotten about line endings but correcting them has made no
difference. On trying to execute the script in Terminal I was getting
a "No such file or directory" until changing the @list = line to
@list = `ls /Users/rm/Desktop/cups-pdf/_*`
Now there are no error messages but no desired results either.
It looks like your problem is that the working directory is not the
'cups-pdf' directory. You will either have to 'cd' to that directory in
the script or, as I do, put the script in the 'cups-pdf' directory
itself (named .rename_pdf ot hide it from the 'ls').

Yes. Thank you Tom. With a chdir in the script all is well.

Roger
 
T

Tom Stiller

Ron Kaplan said:
So, I have read the list of interesting ideas to remediate this bug. There.
I said it. It is a bug. The fact that the PDF driver treats each print job
as a separate job is by design and appropriate.

The Microsoft folks need to concatenate these jobs into one print file.

Is anyone from this newsgroup able to pass this on?

You seem to be quite able to express yourself; why don't *you* pass it
on.
 
R

Ron Kaplan

Tom,

Looked at the MS/Mac Website, could not decipher how to pass this on. Would
love to have some productive response about the process of making feature
requests.

Thanks.
 
J

jleblanc [MSFT]

Hi Ron,

Thanks for your feedback about your PDF printing issues. I will be
forwarding this along to the appropriate folks.

Joe LeBlanc
MacBU Excel Test team, (e-mail address removed)

(posted through google groups)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top