title: How to write content into pdf? Google Cloud Storage Service
body: <p>How can i create a pdf into gcs, and also insert some data?</p>
  
  <p>This is my code:</p>
  
  <blockquote>
  <pre><code>GcsService gcsService = GcsServiceFactory.createGcsService(new RetryParams.Builder()
              .initialRetryDelayMillis(10)
              .retryMaxAttempts(10)
              .totalRetryPeriodMillis(15000)
              .build());
  
            GcsFilename filename = new GcsFilename("areteaics", "test.pdf");
            GcsFileOptions options = new GcsFileOptions.Builder().mimeType("application/pdf").build();
            GcsOutputChannel writeChannel = gcsService.createOrReplace(filename,options);           
            PrintWriter out = new PrintWriter(Channels.newWriter(writeChannel, "UTF8"));
            //out.println("The woods are lovely dark and deep.");
            //out.println("But I have promises to keep.");
            //out.flush();
            writeChannel.waitForOutstandingWrites();
            //writeChannel.write(ByteBuffer.wrap("And miles to go before I sleep.".getBytes()));
            writeChannel.close();
  </code></pre>
  </blockquote>