Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

code python word convert to pdf doesn't work #277

Closed
666sasuke666 opened this issue May 28, 2020 · 3 comments
Closed

code python word convert to pdf doesn't work #277

666sasuke666 opened this issue May 28, 2020 · 3 comments

Comments

@666sasuke666
Copy link

hi
i have tried a code to convert a word into a pdf andit doesn't work
example

import sys
import os
import comptypes.client

def word_to_pdf (_in, _out):
pdf_format_key = 17
file_in = os.path.abspath (_in)
file_out = os.path.abspath (_out)
worddoc = comtypes.client.CreateObject ( 'Word.Application' )
doc = worddoc.Documents.Open (file_in)
doc.SaveAs (file_out, FileFormat = pdf_format_key)
doc.Close ()
worddoc.Quit ()

destination = sys.argv [ 1 ]
for file in os.listdir (destination):
word_to_pdf (destination + "\" + file , destination + "\" + file + ".pdf" )

after that i run it in the comand prompt for for the file word in the folder specified in his path and it show me this

image

@knonomura
Copy link
Member

Your issue is opened in griddb/griddb_nosql repository,
but I guess it is another topic.

@balk125
Copy link

balk125 commented Jun 4, 2020

I think you have create a virtual environment through your pycham during creating your new project but you downloading the module in the existing interpreter.
Go to pycham setting and change virtual environment into existing interpreter.

@knonomura
Copy link
Member

I close this issue as it is not related to this repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants