[ 
https://issues.apache.org/jira/browse/CAMEL-3447?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12973204#action_12973204
 ] 

Claus Ibsen commented on CAMEL-3447:
------------------------------------

If the Java Print API was just an enum then the type converter system could do 
this automatic. But hey they must suffer from backwards comp. as well.

> align media size names in camel-printer component configuration with 
> javax.print.attribute.standard.MediaSizeName
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-3447
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3447
>             Project: Camel
>          Issue Type: Improvement
>    Affects Versions: 2.5.0
>         Environment: component: camel-printer (could not select it from 
> components list).
>            Reporter: Torsten Mielke
>         Attachments: MediaSizeAssigner.patch
>
>
> The [camel-printer documentation|http://camel.apache.org/printer.html] refers 
> to javax.print.attribute.standard.MediaSizeName for the mediaSize name 
> configuration:
> {quote}
> "Sets the stationary as defined by enumeration settings in the 
> javax.print.attribute.standard.MediaSizeName API"
> {quote}
> However the camel-printer helper class MediaSizeAssigner internally does not 
> match the enumeration names defined in 
> javax.print.attribute.standard.MediaSizeName. 
> E.g. notice these differences:
> javax.print.attribute.standard.MediaSizeName enum:
> ISO_A4
> JIS_B0
> JAPANESE_POSTCARD
> camel-printer MediaSizeAssigner:
> ISO-A4
> JIS-B0
> JAPANESE-POSTCARD
> The difference is only in the use of '-' vs. '_' character but without 
> looking at the camel-printer source, one would currently not know what the 
> right media size string needs to be. Since there is already a standard naming 
> scheme defined in javax.print.attribute.standard.MediaSizeName, lets use it. 
> This only requires a simple update to class MediaSizeAssigner. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to