webkitpdf.vala
authorAlan Knowles <alan@roojs.com>
Tue, 16 Aug 2016 05:43:04 +0000 (13:43 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 16 Aug 2016 05:43:04 +0000 (13:43 +0800)
webkitpdf.vala

index 3a4534e..ef26465 100644 (file)
@@ -9,14 +9,16 @@ public class webkitpdf {
  
     public static string? opt_url = null;
        public static uint opt_delay = 0;
+       public static uint opt_width = 0;
+       public static uint opt_height = 0;
        public static string? opt_target_png = null;
        public static string? opt_target_pdf = null;    
        [CCode (array_length = false, array_null_terminated = true)]
        public static string[] opt_inject_js;
        const OptionEntry[] options = {
                
-                       { "width", 0, 0, OptionArg.STRING, ref opt_url, "Width (default 500)", null },                  
-                       { "height", 0, 0, OptionArg.STRING, ref opt_url, "Height (PNG only) (default to expand to fit)", null },                                                
+                       { "width", 0, 0, OptionArg.INT, ref opt_width, "Width (default 1200)", null },                  
+                       { "height", 0, 0, OptionArg.INT, ref opt_height, "Height (PNG only) (default to expand to fit)", null },                                                
                        { "url", 0, 0, OptionArg.STRING, ref opt_url, "Url to grab", null },
                        { "delay", 0, 0, OptionArg.INT, ref opt_delay, "Delay before snapshot in seconds", null },
                        { "png", 0, 0, OptionArg.STRING, ref opt_target_png, "File to write (PNG)", null },
@@ -79,4 +81,5 @@ public class webkitpdf {
 }
 
 
  
\ No newline at end of file