Guys,

Is there any update regarding prefix the image names or change it somehow?

Thanks,

Daniel

On Wednesday, November 25, 2015 at 7:52:52 AM UTC-2, Róbert Nagy wrote:
Hello everyone!

I want to covert a docx to a docbook file with --extract-media, so i can upload the pictures automatically into a database.
Is there any "hack" to keep the original filename for the extracted picture's name + imegaobject fileref's value?

For example...
I have a file what has been pasted into the docx file with this name -> picture_upload.png. I want to extract into the /media folder as 'picture_upload.png', and set the docbook's imegamedia fileref's value to 'picture_upload.png' or './media/picture_upload.png'.

In the <file>/word/document.xml there is this block, what contains the original filename:
<pic:pic xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture">
   
<pic:nvPicPr>
       
<pic:cNvPr id="0" name="picture_upload.png"/>
           
<pic:cNvPicPr/>
     
</pic:nvPicPr>
     
<pic:blipFill>
         
<a:blip r:embed="rId21"/>
             
<a:stretch>
                 
<a:fillRect/>
             
</a:stretch>
     
</pic:blipFill>
      ...


Its reference is in the <file>/word/_rels/document.xml:
Target="media/image110.png"/><Relationship Id="rId21" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image"

And the docbook output is:
<imagedata fileref="./media/image110.png" />

The file's name in the './media' folder is the same as the "Target" value.

Any idea will help :)
Thank you.

--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/396dae4f-6e94-4eff-9c5b-a99f303961f9%40googlegroups.com.