@@ -52,7 +52,7 @@ public class PdfConvertOptions extends ConvertOptions {
5252 private Integer height = null ;
5353
5454 @ SerializedName ("dpi" )
55- private Double dpi = null ;
55+ private Integer dpi = null ;
5656
5757 @ SerializedName ("password" )
5858 private String password = null ;
@@ -475,6 +475,140 @@ public RotateEnum read(final JsonReader jsonReader) throws IOException {
475475 @ SerializedName ("rotate" )
476476 private RotateEnum rotate = null ;
477477
478+ /**
479+ * Specifies page size
480+ */
481+ @ JsonAdapter (PageSizeEnum .Adapter .class )
482+ public enum PageSizeEnum {
483+ DEFAULT ("Default" ),
484+
485+ A3 ("A3" ),
486+
487+ STATEMENT ("Statement" ),
488+
489+ QUARTO ("Quarto" ),
490+
491+ PAPER11X17 ("Paper11x17" ),
492+
493+ PAPER10X14 ("Paper10x14" ),
494+
495+ LETTER ("Letter" ),
496+
497+ LEGAL ("Legal" ),
498+
499+ LEDGER ("Ledger" ),
500+
501+ FOLIO ("Folio" ),
502+
503+ EXECUTIVE ("Executive" ),
504+
505+ ENVELOPEDL ("EnvelopeDL" ),
506+
507+ CUSTOM ("Custom" ),
508+
509+ B5 ("B5" ),
510+
511+ B4 ("B4" ),
512+
513+ A5 ("A5" ),
514+
515+ A4 ("A4" ),
516+
517+ TABLOID ("Tabloid" );
518+
519+ private String value ;
520+
521+ PageSizeEnum (String value ) {
522+ this .value = value ;
523+ }
524+
525+ public String getValue () {
526+ return value ;
527+ }
528+
529+ @ Override
530+ public String toString () {
531+ return String .valueOf (value );
532+ }
533+
534+ public static PageSizeEnum fromValue (String text ) {
535+ for (PageSizeEnum b : PageSizeEnum .values ()) {
536+ if (String .valueOf (b .value ).equals (text )) {
537+ return b ;
538+ }
539+ }
540+ return null ;
541+ }
542+
543+ public static class Adapter extends TypeAdapter <PageSizeEnum > {
544+ @ Override
545+ public void write (final JsonWriter jsonWriter , final PageSizeEnum enumeration ) throws IOException {
546+ jsonWriter .value (enumeration .getValue ());
547+ }
548+
549+ @ Override
550+ public PageSizeEnum read (final JsonReader jsonReader ) throws IOException {
551+ String value = jsonReader .nextString ();
552+ return PageSizeEnum .fromValue (String .valueOf (value ));
553+ }
554+ }
555+ }
556+
557+ @ SerializedName ("pageSize" )
558+ private PageSizeEnum pageSize = null ;
559+
560+ /**
561+ * Specifies page orientation
562+ */
563+ @ JsonAdapter (PageOrientationEnum .Adapter .class )
564+ public enum PageOrientationEnum {
565+ DEFAULT ("Default" ),
566+
567+ LANDSCAPE ("Landscape" ),
568+
569+ PORTRAIT ("Portrait" );
570+
571+ private String value ;
572+
573+ PageOrientationEnum (String value ) {
574+ this .value = value ;
575+ }
576+
577+ public String getValue () {
578+ return value ;
579+ }
580+
581+ @ Override
582+ public String toString () {
583+ return String .valueOf (value );
584+ }
585+
586+ public static PageOrientationEnum fromValue (String text ) {
587+ for (PageOrientationEnum b : PageOrientationEnum .values ()) {
588+ if (String .valueOf (b .value ).equals (text )) {
589+ return b ;
590+ }
591+ }
592+ return null ;
593+ }
594+
595+ public static class Adapter extends TypeAdapter <PageOrientationEnum > {
596+ @ Override
597+ public void write (final JsonWriter jsonWriter , final PageOrientationEnum enumeration ) throws IOException {
598+ jsonWriter .value (enumeration .getValue ());
599+ }
600+
601+ @ Override
602+ public PageOrientationEnum read (final JsonReader jsonReader ) throws IOException {
603+ String value = jsonReader .nextString ();
604+ return PageOrientationEnum .fromValue (String .valueOf (value ));
605+ }
606+ }
607+ }
608+
609+ @ SerializedName ("pageOrientation" )
610+ private PageOrientationEnum pageOrientation = null ;
611+
478612 public PdfConvertOptions width (Integer width ) {
479613 this .width = width ;
480614 return this ;
@@ -511,7 +645,7 @@ public void setHeight(Integer height) {
511645 this .height = height ;
512646 }
513647
514- public PdfConvertOptions dpi (Double dpi ) {
648+ public PdfConvertOptions dpi (Integer dpi ) {
515649 this .dpi = dpi ;
516650 return this ;
517651 }
@@ -521,11 +655,11 @@ public PdfConvertOptions dpi(Double dpi) {
521655 * @return dpi
522656 **/
523657 @ ApiModelProperty (required = true , value = "Desired page DPI after conversion. The default resolution is: 96dpi" )
524- public Double getDpi () {
658+ public Integer getDpi () {
525659 return dpi ;
526660 }
527661
528- public void setDpi (Double dpi ) {
662+ public void setDpi (Integer dpi ) {
529663 this .dpi = dpi ;
530664 }
531665
@@ -1015,6 +1149,42 @@ public void setRotate(RotateEnum rotate) {
10151149 this .rotate = rotate ;
10161150 }
10171151
1152+ public PdfConvertOptions pageSize (PageSizeEnum pageSize ) {
1153+ this .pageSize = pageSize ;
1154+ return this ;
1155+ }
1156+
1157+ /**
1158+ * Specifies page size
1159+ * @return pageSize
1160+ **/
1161+ @ ApiModelProperty (required = true , value = "Specifies page size" )
1162+ public PageSizeEnum getPageSize () {
1163+ return pageSize ;
1164+ }
1165+
1166+ public void setPageSize (PageSizeEnum pageSize ) {
1167+ this .pageSize = pageSize ;
1168+ }
1169+
1170+ public PdfConvertOptions pageOrientation (PageOrientationEnum pageOrientation ) {
1171+ this .pageOrientation = pageOrientation ;
1172+ return this ;
1173+ }
1174+
1175+ /**
1176+ * Specifies page orientation
1177+ * @return pageOrientation
1178+ **/
1179+ @ ApiModelProperty (required = true , value = "Specifies page orientation" )
1180+ public PageOrientationEnum getPageOrientation () {
1181+ return pageOrientation ;
1182+ }
1183+
1184+ public void setPageOrientation (PageOrientationEnum pageOrientation ) {
1185+ this .pageOrientation = pageOrientation ;
1186+ }
1187+
10181188
10191189 @ Override
10201190 public boolean equals (java .lang .Object o ) {
@@ -1055,12 +1225,14 @@ public boolean equals(java.lang.Object o) {
10551225 Objects .equals (this .pageLayout , pdfConvertOptions .pageLayout ) &&
10561226 Objects .equals (this .pageMode , pdfConvertOptions .pageMode ) &&
10571227 Objects .equals (this .rotate , pdfConvertOptions .rotate ) &&
1228+ Objects .equals (this .pageSize , pdfConvertOptions .pageSize ) &&
1229+ Objects .equals (this .pageOrientation , pdfConvertOptions .pageOrientation ) &&
10581230 super .equals (o );
10591231 }
10601232
10611233 @ Override
10621234 public int hashCode () {
1063- return Objects .hash (width , height , dpi , password , marginTop , marginBottom , marginLeft , marginRight , pdfFormat , removePdfaCompliance , zoom , linearize , linkDuplicateStreams , removeUnusedObjects , removeUnusedStreams , compressImages , imageQuality , unembedFonts , grayscale , centerWindow , direction , displayDocTitle , fitWindow , hideMenuBar , hideToolBar , hideWindowUI , nonFullScreenPageMode , pageLayout , pageMode , rotate , super .hashCode ());
1235+ return Objects .hash (width , height , dpi , password , marginTop , marginBottom , marginLeft , marginRight , pdfFormat , removePdfaCompliance , zoom , linearize , linkDuplicateStreams , removeUnusedObjects , removeUnusedStreams , compressImages , imageQuality , unembedFonts , grayscale , centerWindow , direction , displayDocTitle , fitWindow , hideMenuBar , hideToolBar , hideWindowUI , nonFullScreenPageMode , pageLayout , pageMode , rotate , pageSize , pageOrientation , super .hashCode ());
10641236 }
10651237
10661238
@@ -1099,6 +1271,8 @@ public String toString() {
10991271 sb .append (" pageLayout: " ).append (toIndentedString (pageLayout )).append ("\n " );
11001272 sb .append (" pageMode: " ).append (toIndentedString (pageMode )).append ("\n " );
11011273 sb .append (" rotate: " ).append (toIndentedString (rotate )).append ("\n " );
1274+ sb .append (" pageSize: " ).append (toIndentedString (pageSize )).append ("\n " );
1275+ sb .append (" pageOrientation: " ).append (toIndentedString (pageOrientation )).append ("\n " );
11021276 sb .append ("}" );
11031277 return sb .toString ();
11041278 }
0 commit comments