py2docx icon indicating copy to clipboard operation
py2docx copied to clipboard

something wrong with the IMAGE

Open lqyp0420 opened this issue 10 years ago • 4 comments

there is something wrong with the IMAGE, when i change the suffix docx to zip, i found that there is no pictures in the media file. so it can't import the pictures, also, if i want to put two pictures in a line, how can i do it? thank you for your package, i think it is the best one in control the office word now in python with xml.

lqyp0420 avatar Apr 04 '14 05:04 lqyp0420

About the problem, could you send me the type and the size of the image? I tried with some pictures here and it worked. =/ Probably I need to test a specific case. Or, could you try another picture? By now it is not possible to do this. What you can do is build a table with no border and put 2 cells in a row, and then the pictures. Because the element Image is inside a paragraph. To do this without the table, you should put an absolute position on the picture, and the module don't do this for now, sorry.. Thank you for the contribution!

rafaels88 avatar Apr 04 '14 15:04 rafaels88

I just used the sample you listed in your introduction, and changed the image in my own picture Image(r"C:\material-gui\post-dat\2.png", document=doc, align='center')

lqyp0420 avatar Apr 07 '14 08:04 lqyp0420

I just used the sample you listed in your introduction, and changed the image in my own picture Image(r"C:\material-gui\post-dat\2.png", document=doc, align='center')

lqyp0420 avatar Apr 07 '14 08:04 lqyp0420

Could you try putting and relative path? Like put the image in the same folder of the script, and put the path like Image('2.png', document=doc, align='center')

rafaels88 avatar May 02 '14 17:05 rafaels88