title: created Pdf by using pdf print through webview. it creates large size pdf around 19 mb.but images are around 500, 600 kb already compressed
body: <p>I am creating  a PDF in my android app by using pdf print through <code>WebvView</code>. It creates large size PDF around 19 MB.but there are 4,5 images which  around 500, 600 KB max.i am unable to reduce the PDF file size.</p>
  
  <pre><code>public static void createWebPrintJob(Activity activity, WebView webView, File directory, String fileName, final Callback callback) {
  
      //check the marshmallow permission
      if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.M) {
          if (activity.checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
              activity.requestPermissions(new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, REQUEST_CODE);
              callback.failure();
             return;
          }
      }
  
      String jobName = activity.getString(R.string.app_name) + " Document";
      PrintAttributes attributes = null;
      if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.KITKAT) {
          attributes = new PrintAttributes.Builder()
                  .setMediaSize(PrintAttributes.MediaSize.ISO_A4)
                  .setResolution(new PrintAttributes.Resolution("pdf", "pdf", 100, 100))
                  .setMinMargins(PrintAttributes.Margins.NO_MARGINS).build();
      }
  }
  </code></pre>