Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 3.1.2
-
Component/s: Examples
-
Labels:None
-
Environment:LINUX: 2.6.31-15-generic #50-Ubuntu SMP Tue Nov 10 14:54:29 UTC 2009 i686 GNU/Linux
Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
-
Workaround Exists:Yes
-
Workaround Description:modify example as described above
Description
On Line 97 of PrintServices.java there is a for loop which lists the users printers:
for (int i = 0, max = services.length - 1; i < max; i++) {
If the user has only a single printer (as I do on my Ubuntu system) then no printers are listed.
Instead of testing for "i < max" the test should be "i <= max"
for (int i = 0, max = services.length - 1; i <= max; i++) {
At the same time for clarity it may also be worth changing the user prompt on line 99 to include "printer number" :
"Please select the printer number your wish to print to (q to quit):");
Regards
Alec Cormack
p.s. ICEpdf is great software. Many thanks!
for (int i = 0, max = services.length - 1; i < max; i++) {
If the user has only a single printer (as I do on my Ubuntu system) then no printers are listed.
Instead of testing for "i < max" the test should be "i <= max"
for (int i = 0, max = services.length - 1; i <= max; i++) {
At the same time for clarity it may also be worth changing the user prompt on line 99 to include "printer number" :
"Please select the printer number your wish to print to (q to quit):");
Regards
Alec Cormack
p.s. ICEpdf is great software. Many thanks!
Activity
Alec Cormack
created issue -
Ken Fyten
made changes -
Field | Original Value | New Value |
---|---|---|
Salesforce Case | [] | |
Fix Version/s | 4.1 [ 10227 ] | |
Fix Version/s | 4.0 [ 10222 ] |
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #21645 | Fri Jun 04 03:31:26 MDT 2010 | patrick.corless | |
Files Changed | ||||
MODIFY
/icepdf/trunk/icepdf/examples/printservices/PrintServices.java
|
Patrick Corless
made changes -
Salesforce Case | [] | |
Fix Version/s | 4.0.1 [ 10228 ] | |
Fix Version/s | 4.1 [ 10227 ] |
Patrick Corless
made changes -
Status | Open [ 1 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Patrick Corless
made changes -
Salesforce Case | [] | |
Fix Version/s | 4.0.2 [ 10234 ] | |
Fix Version/s | 4.0.1 [ 10228 ] |
Patrick Corless
made changes -
Fix Version/s | 4.1 [ 10227 ] |
Ken Fyten
made changes -
Status | Resolved [ 5 ] | Closed [ 6 ] |
Sorry, I am not sure if I should have cloned
PDF-125however I could not see how to reopen the issue.I have downloaded the 4.0.0 version of IcePdf and PrintServices.java still has the
PDF-125bug in that it never shows all the printers.line 105 should be
for (int i = 0, max = services.length - 1; i <= max; i++) {
not
for (int i = 0, max = services.length - 1; i < max; i++) {