pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tilman Hausherr <THaush...@t-online.de>
Subject Re: PrintPDF doesn't support 1:1 printer name matching
Date Wed, 06 Feb 2019 07:46:58 GMT
Thanks,
https://issues.apache.org/jira/browse/PDFBOX-4456
created.

Tilman


Am 05.02.2019 um 18:14 schrieb Thorsten Schöning:
> Hi all,
>
> I'm using multiple printers following some naming scheme regarding their
> purpose, like the following:
>
> * FreePDF
> * FreePDF - SomeProfile
> * FreePDF - SomeProfile2
> * PDFCreator
> * PDFCreator - ...
> * ...
>
> When using the argument "-printerName FreePDF" on the shell, one of
> the printers using an additional profile is used to actually print
> instead of the one I expected. The reason is that printer names are
> not matched 1:1 or using some glob syntax or whatever, but using
> "contains":
>
>> if (printService[i].getName().contains(printerName))
> https://svn.apache.org/viewvc/pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PrintPDF.java?view=markup#l157
>
> Looking at the history of those lines, this seem to have been the case
> ever since moving the project to Apache.
>
> https://svn.apache.org/viewvc/pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PrintPDF.java?annotate=682412&pathrev=1852674#l125
>
> At least I don't know of any application behaving the same way,
> printer names are either matched 1:1 or, if at all, some glob syntax
> or regular expression is supported optionally. The current behaviour
> would force me and my customers to rename printers and in my opinion
> is totally unexpected. It's not even documented that way:
>
>> -printerName <name>             Print to specified printer.
> Which is wrong, it's more or less printing to some arbitrary printer
> containing the name somewhere and without any documented ordering
> and stuff. :-)
>
> So, is that considered a feature or a bug?
>
> I vote for the latter and would like to see that fixed. If "contains"
> is really needed, implementing optional support for globs or regular
> expressions with proper documentation should be the way to go. Else
> 1:1 matching is least surprising for most users in my opinion.
>
> Thanks!
>
> Mit freundlichen Grüßen,
>
> Thorsten Schöning
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


Mime
View raw message