title: Base64 Docx to Base64 pdf
body: <p>Im trying to convert a Base64 Docx to a Base64 pdf, for test purpose im receiving the base64 docx and im saving it in my Django static folder like this:</p>
  <pre><code>Proyect
  --App
  ----static
  ------Docs
  --------test.docx
  </code></pre>
  <p>So, Im trying with doxc2pdf library to make the convertion and the into base64 like this:</p>
  <pre><code>class Converttest(View):
  
      def post(self, request, *args, **kwargs):
          template = loader.get_template('home.html')
  
          testdoc = static('Docs/test.docx')
          pdf = convert(testdoc)
          encoded = base64.b64encode(pdf)
          context = {}
          return HttpResponse(template.render(context, request))
  </code></pre>
  <p>But im getting this error:</p>
  <pre><code>pywintypes.com_error: (-2147221005, 'Invalid class string', None, None)
  &gt; g:\python_projects\reps\stratos\strategy\views.py(162)post()
  -&gt; convert(testdoc)
  </code></pre>
  <p>Any idea what am I doing wrong ?</p>