Categories > OpenTBS with DOCX >

Pictures as list item in a table cell

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Arjun
Date: 2014-07-30
Time: 06:00

Pictures as list item in a table cell

Dear Skrol29,

I have a table with few list items in it and one of them is for images, here is the code in the image description:
[rptdf_sub5.val;ope=changepic;from=[val].png;block=tbs:listitem;tagpos=inside;adjust]

While opening the document i get an Ms Word error "The document cannot be opened because there are problems with the contents." Click OK
"We found unreadable contents in document. Do you want to recover the contents of this document...." Click Yes/No

When opened clicking yes everything looks good, images are there as list items.
How do i fix the error message i get while i open the document.

Thanks in advance.
By: Skrol29
Date: 2014-07-30
Time: 23:17

Re: Pictures as list item in a table cell

Hi,

Is your block paced inside a text box ?
By: Arjun
Date: 2014-07-31
Time: 04:39

Re: Pictures as list item in a table cell

Hi,

Its inside a table cell, refer to my previous post(below link) you'll get an idea.

http://www.tinybutstrong.com/forum.php?thr=3365#m14244
By: Skrol29
Date: 2014-08-01
Time: 23:50

Re: Pictures as list item in a table cell

Difficult to say.
Is it possible for you to send to me the template and the result of the merge ?
By: Skrol29
Date: 2014-08-03
Time: 23:36

Re: Pictures as list item in a table cell

Hi Arjun,

This is a common problem using OpenTbs : your script is sending extra output after you call the Show() method.
This extra output do corrupt the download streaming.

This can be see because the end of the binary content of your merged docx is something like (in your case) :
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta http-equiv="refresh" content="1;url=http://localhost/..." />

        <title>Redirecting to http://localhost/...</title>
    </head>
    <body>
        Redirecting to <a href="http://localhost/...</a>.
    </body>
</html>
By: Arjun
Date: 2014-08-04
Time: 08:28

Re: Pictures as list item in a table cell

Hi,

Can you give me any suggestion on how to fix this, here i am passing the file path using an array in PHP.
By: Skrol29
Date: 2014-08-04
Time: 12:38

Re: Pictures as list item in a table cell

This has nothing to do with the data or the merging.
Simply do an exit() after the Show() method.
By: Arjun
Date: 2014-08-04
Time: 12:56

Re: Pictures as list item in a table cell

Yes that works, but when i am adding more than one item in the list the same error pops up.

This is what i am doing now.

$TBS->Show(OPENTBS_DOWNLOAD+TBS_EXIT, $output_filename);
By: Skrol29
Date: 2014-08-04
Time: 14:09

Re: Pictures as list item in a table cell

Check the binary contents of the merged docx with a text editor.
By: Arjun
Date: 2014-08-06
Time: 06:54

Re: Pictures as list item in a table cell

looks like the error is not there when i am doing the EXIT on show method, but when i have two or more images and the list item overflows to the next page, then i get the same error.
$TBS->Show(OPENTBS_DOWNLOAD+TBS_EXIT, $output_filename);