public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Pandoc HTML to WORD Conversion embeded non-editable images
@ 2021-04-02 15:43 Michael Becker
       [not found] ` <98ae6e6d-c3ff-4104-ae3c-41905c505394n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Michael Becker @ 2021-04-02 15:43 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 601 bytes --]

Love pandoc, but alas I have an issue. When I covert an HTML file with 
images to .docx the images are embedded. I can't click on them or resize 
them. Does anyone have a solution for this?

-- 
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/98ae6e6d-c3ff-4104-ae3c-41905c505394n%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 888 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Pandoc HTML to WORD Conversion embeded non-editable images
       [not found] ` <98ae6e6d-c3ff-4104-ae3c-41905c505394n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2021-04-03 13:58   ` Michael Becker
       [not found]     ` <b4a99de5-0263-4312-a29d-88785cffbc12n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Michael Becker @ 2021-04-03 13:58 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1190 bytes --]

To illustrate my challenge, here are two test files.  I'm using this 
command to covert the HTML:

pandoc -s TestFile4.html --reference-doc=aiztemp.docx -o TestFile4.docx

As you can see, the result gives the word file, but the image in the file 
can not be resized or adjusted in any way.  I would really love to learn 
what I can do to fix this so that I can do post-conversion editing on my 
file. For example, is there a wrapper I should be putting around the images 
in the HMTL?

I hope someone can help. 

On Friday, April 2, 2021 at 8:43:19 AM UTC-7 Michael Becker wrote:

> Love pandoc, but alas I have an issue. When I covert an HTML file with 
> images to .docx the images are embedded. I can't click on them or resize 
> them. Does anyone have a solution for this?
>

-- 
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/b4a99de5-0263-4312-a29d-88785cffbc12n%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 1778 bytes --]

[-- Attachment #2: TestFile4.docx --]
[-- Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document, Size: 25831 bytes --]

[-- Attachment #3: TestFile4.html --]
[-- Type: text/html, Size: 444 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Pandoc HTML to WORD Conversion embeded non-editable images
       [not found]     ` <b4a99de5-0263-4312-a29d-88785cffbc12n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2021-04-03 14:55       ` Bastien DUMONT
  2021-04-03 15:16         ` Michael Becker
  0 siblings, 1 reply; 8+ messages in thread
From: Bastien DUMONT @ 2021-04-03 14:55 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Hi,

The DOCX writer inserts this element in the document's XML source code which locks the picture:

  <pic:cNvPicPr>
    <a:picLocks noChangeArrowheads="1" noChangeAspect="1"/>
  </pic:cNvPicPr>

I guess that there should be something in Word to change this, like right-click on the image > Properties > Advanced Properties, but I can't check it. Otherwise you can access it via a macro. Uncompressing the DOCX file, removing the offending element in word/document.xml and recompressing it may also do the trick, although I have no way to verify it.

If all you want to do is to change height or width, you can set these attributes in the HTML file.

Regards,

Bastien

Le Saturday 03 April 2021 à 06:58:29AM, Michael Becker a écrit :
> To illustrate my challenge, here are two test files.  I'm using this command to
> covert the HTML:
> 
> pandoc -s TestFile4.html --reference-doc=aiztemp.docx -o TestFile4.docx
> 
> As you can see, the result gives the word file, but the image in the file can
> not be resized or adjusted in any way.  I would really love to learn what I can
> do to fix this so that I can do post-conversion editing on my file. For
> example, is there a wrapper I should be putting around the images in the HMTL?
> 
> I hope someone can help.
> 
> On Friday, April 2, 2021 at 8:43:19 AM UTC-7 Michael Becker wrote:
> 
>     Love pandoc, but alas I have an issue. When I covert an HTML file with
>     images to .docx the images are embedded. I can't click on them or resize
>     them. Does anyone have a solution for this?
> 
> --
> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit https://groups.google.com/d/msgid/
> pandoc-discuss/b4a99de5-0263-4312-a29d-88785cffbc12n%40googlegroups.com.


> Test file
> 
> 
> [mBecker]
> 
> Section 1
> 
> Some text
> 
> Section 2
> 
> Some text
> 

-- 
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/YGiB5kv864QJuzd7%40localhost.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Pandoc HTML to WORD Conversion embeded non-editable images
  2021-04-03 14:55       ` Bastien DUMONT
@ 2021-04-03 15:16         ` Michael Becker
       [not found]           ` <97776a8b-702a-4eda-8b7a-e1bfa349ed2cn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Michael Becker @ 2021-04-03 15:16 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 2789 bytes --]

Thanks. This is helpful, I'll keep digging.

On Saturday, April 3, 2021 at 7:55:52 AM UTC-7 Bastien Dumont wrote:

> Hi,
>
> The DOCX writer inserts this element in the document's XML source code 
> which locks the picture:
>
> <pic:cNvPicPr>
> <a:picLocks noChangeArrowheads="1" noChangeAspect="1"/>
> </pic:cNvPicPr>
>
> I guess that there should be something in Word to change this, like 
> right-click on the image > Properties > Advanced Properties, but I can't 
> check it. Otherwise you can access it via a macro. Uncompressing the DOCX 
> file, removing the offending element in word/document.xml and recompressing 
> it may also do the trick, although I have no way to verify it.
>
> If all you want to do is to change height or width, you can set these 
> attributes in the HTML file.
>
> Regards,
>
> Bastien
>
> Le Saturday 03 April 2021 à 06:58:29AM, Michael Becker a écrit :
> > To illustrate my challenge, here are two test files. I'm using this 
> command to
> > covert the HTML:
> > 
> > pandoc -s TestFile4.html --reference-doc=aiztemp.docx -o TestFile4.docx
> > 
> > As you can see, the result gives the word file, but the image in the 
> file can
> > not be resized or adjusted in any way. I would really love to learn what 
> I can
> > do to fix this so that I can do post-conversion editing on my file. For
> > example, is there a wrapper I should be putting around the images in the 
> HMTL?
> > 
> > I hope someone can help.
> > 
> > On Friday, April 2, 2021 at 8:43:19 AM UTC-7 Michael Becker wrote:
> > 
> > Love pandoc, but alas I have an issue. When I covert an HTML file with
> > images to .docx the images are embedded. I can't click on them or resize
> > them. Does anyone have a solution for this?
> > 
> > --
> > 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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/
> > pandoc-discuss/b4a99de5-0263-4312-a29d-88785cffbc12n%40googlegroups.com.
>
>
> > Test file
> > 
> > 
> > [mBecker]
> > 
> > Section 1
> > 
> > Some text
> > 
> > Section 2
> > 
> > Some text
> > 
>
>

-- 
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/97776a8b-702a-4eda-8b7a-e1bfa349ed2cn%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 4083 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Pandoc HTML to WORD Conversion embeded non-editable images
       [not found]           ` <97776a8b-702a-4eda-8b7a-e1bfa349ed2cn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2021-04-03 15:20             ` Michael Becker
  2021-04-03 20:25             ` John MacFarlane
  1 sibling, 0 replies; 8+ messages in thread
From: Michael Becker @ 2021-04-03 15:20 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 3237 bytes --]

I've validated that I can change it at the source. Next step, however, is 
to figure out how to unlock an image in Word for spot adjustments. Using 
Mac BTW.  There does not seem to be be a preference as you suggest.  Thanks 
for the reply. :)

On Saturday, April 3, 2021 at 8:16:45 AM UTC-7 Michael Becker wrote:

> Thanks. This is helpful, I'll keep digging.
>
> On Saturday, April 3, 2021 at 7:55:52 AM UTC-7 Bastien Dumont wrote:
>
>> Hi, 
>>
>> The DOCX writer inserts this element in the document's XML source code 
>> which locks the picture: 
>>
>> <pic:cNvPicPr> 
>> <a:picLocks noChangeArrowheads="1" noChangeAspect="1"/> 
>> </pic:cNvPicPr> 
>>
>> I guess that there should be something in Word to change this, like 
>> right-click on the image > Properties > Advanced Properties, but I can't 
>> check it. Otherwise you can access it via a macro. Uncompressing the DOCX 
>> file, removing the offending element in word/document.xml and recompressing 
>> it may also do the trick, although I have no way to verify it. 
>>
>> If all you want to do is to change height or width, you can set these 
>> attributes in the HTML file. 
>>
>> Regards, 
>>
>> Bastien 
>>
>> Le Saturday 03 April 2021 à 06:58:29AM, Michael Becker a écrit : 
>> > To illustrate my challenge, here are two test files. I'm using this 
>> command to 
>> > covert the HTML: 
>> > 
>> > pandoc -s TestFile4.html --reference-doc=aiztemp.docx -o TestFile4.docx 
>> > 
>> > As you can see, the result gives the word file, but the image in the 
>> file can 
>> > not be resized or adjusted in any way. I would really love to learn 
>> what I can 
>> > do to fix this so that I can do post-conversion editing on my file. For 
>> > example, is there a wrapper I should be putting around the images in 
>> the HMTL? 
>> > 
>> > I hope someone can help. 
>> > 
>> > On Friday, April 2, 2021 at 8:43:19 AM UTC-7 Michael Becker wrote: 
>> > 
>> > Love pandoc, but alas I have an issue. When I covert an HTML file with 
>> > images to .docx the images are embedded. I can't click on them or 
>> resize 
>> > them. Does anyone have a solution for this? 
>> > 
>> > -- 
>> > 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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 
>> > To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/ 
>> > pandoc-discuss/b4a99de5-0263-4312-a29d-88785cffbc12n%40googlegroups.com. 
>>
>>
>>
>> > Test file 
>> > 
>> > 
>> > [mBecker] 
>> > 
>> > Section 1 
>> > 
>> > Some text 
>> > 
>> > Section 2 
>> > 
>> > Some text 
>> > 
>>
>>

-- 
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/1bf0fb23-9978-43a4-a8e5-4163b9e0631an%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 4617 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Pandoc HTML to WORD Conversion embeded non-editable images
       [not found]           ` <97776a8b-702a-4eda-8b7a-e1bfa349ed2cn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2021-04-03 15:20             ` Michael Becker
@ 2021-04-03 20:25             ` John MacFarlane
       [not found]               ` <m2v9936rpi.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
  1 sibling, 1 reply; 8+ messages in thread
From: John MacFarlane @ 2021-04-03 20:25 UTC (permalink / raw)
  To: Michael Becker, pandoc-discuss

>> The DOCX writer inserts this element in the document's XML source code
>> which locks the picture:
>>
>> <pic:cNvPicPr>
>> <a:picLocks noChangeArrowheads="1" noChangeAspect="1"/>
>> </pic:cNvPicPr>

I don't think this is the issue; I already tried changing
this and it didn't seem to make any difference.

Side note: when I try to create my own docx with images using
pandoc, they are editable.  So I'm not sure what is going on
here.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Pandoc HTML to WORD Conversion embeded non-editable images
       [not found]               ` <m2v9936rpi.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
@ 2021-04-03 22:42                 ` Bastien DUMONT
  2021-04-04  2:17                   ` Michael Becker
  0 siblings, 1 reply; 8+ messages in thread
From: Bastien DUMONT @ 2021-04-03 22:42 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

> 
> I don't think this is the issue; I already tried changing
> this and it didn't seem to make any difference.
> 

Oh, sorry, you're right, all attributes are set to false by default. Here only aspect ratio is locked (the other attribute doesn't seem to be relevant).

There may be a hint here: https://www.wikihow.com/Anchor-an-Image-in-Word
In LibreOffice, I have to anchor the image to the paragraph to be able to move it freely.



Le Saturday 03 April 2021 à 01:25:29PM, John MacFarlane a écrit :
> >> The DOCX writer inserts this element in the document's XML source code
> >> which locks the picture:
> >>
> >> <pic:cNvPicPr>
> >> <a:picLocks noChangeArrowheads="1" noChangeAspect="1"/>
> >> </pic:cNvPicPr>
> 
> I don't think this is the issue; I already tried changing
> this and it didn't seem to make any difference.
> 
> Side note: when I try to create my own docx with images using
> pandoc, they are editable.  So I'm not sure what is going on
> here.
> 
> -- 
> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/m2v9936rpi.fsf%40MacBook-Pro.hsd1.ca.comcast.net.

-- 
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/YGjvOWRQI/QEiriX%40localhost.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Pandoc HTML to WORD Conversion embeded non-editable images
  2021-04-03 22:42                 ` Bastien DUMONT
@ 2021-04-04  2:17                   ` Michael Becker
  0 siblings, 0 replies; 8+ messages in thread
From: Michael Becker @ 2021-04-04  2:17 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 2178 bytes --]

Hi there, I figure it out.  It turns out if an image hi hyperlinked it 
can't be resized. Remove the hyperlink and it works as expected. Who knew? 
Certainly not me. ;-)  Thanks for your help. 

On Saturday, April 3, 2021 at 3:42:17 PM UTC-7 Bastien Dumont wrote:

> > 
> > I don't think this is the issue; I already tried changing
> > this and it didn't seem to make any difference.
> > 
>
> Oh, sorry, you're right, all attributes are set to false by default. Here 
> only aspect ratio is locked (the other attribute doesn't seem to be 
> relevant).
>
> There may be a hint here: https://www.wikihow.com/Anchor-an-Image-in-Word
> In LibreOffice, I have to anchor the image to the paragraph to be able to 
> move it freely.
>
>
>
> Le Saturday 03 April 2021 à 01:25:29PM, John MacFarlane a écrit :
> > >> The DOCX writer inserts this element in the document's XML source code
> > >> which locks the picture:
> > >>
> > >> <pic:cNvPicPr>
> > >> <a:picLocks noChangeArrowheads="1" noChangeAspect="1"/>
> > >> </pic:cNvPicPr>
> > 
> > I don't think this is the issue; I already tried changing
> > this and it didn't seem to make any difference.
> > 
> > Side note: when I try to create my own docx with images using
> > pandoc, they are editable. So I'm not sure what is going on
> > here.
> > 
> > -- 
> > 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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/pandoc-discuss/m2v9936rpi.fsf%40MacBook-Pro.hsd1.ca.comcast.net
> .
>

-- 
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/d7c59025-8792-45cf-afa8-8174c05a2181n%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 3588 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-04-04  2:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-02 15:43 Pandoc HTML to WORD Conversion embeded non-editable images Michael Becker
     [not found] ` <98ae6e6d-c3ff-4104-ae3c-41905c505394n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-04-03 13:58   ` Michael Becker
     [not found]     ` <b4a99de5-0263-4312-a29d-88785cffbc12n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-04-03 14:55       ` Bastien DUMONT
2021-04-03 15:16         ` Michael Becker
     [not found]           ` <97776a8b-702a-4eda-8b7a-e1bfa349ed2cn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-04-03 15:20             ` Michael Becker
2021-04-03 20:25             ` John MacFarlane
     [not found]               ` <m2v9936rpi.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
2021-04-03 22:42                 ` Bastien DUMONT
2021-04-04  2:17                   ` Michael Becker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).