Categories > OpenTBS with ODT >

Multiple pages - lost image after second page

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: ebizo
Date: 2016-10-01
Time: 20:14

Multiple pages - lost image after second page

Here is my template:
<paragraph>
  [rentals;block=begin;comm=w:p]
</paragraph>

<paragraph with "page-break before">
  [rentals.id]
</paragraph>

<paragraph>
  More content
</paragraph>

<paragraph>
  INSERTED IMAGE
</paragraph>

<paragraph>
  [b;block=end;comm=w:p]
</paragraph>

Generally i want multiple letters in single odt (i use Libre).
In content there is a single image but i have problem because image disappears after 2 page...
Any attempts fail, i tried all options with floating and others options. Image is located to paragraph.

Here is screenshot:

http://prntscr.com/comf53

Interesting is when i open file in WordPad i can see all images but in WordPad page-breaks fails so this is not useful for me.

PS (i have problem with single blank page but this is not so important as picture losing bug).
By: Skrol29
Date: 2016-10-04
Time: 13:07

Re: Multiple pages - lost image after second page

Parameter "comm=w:p" cannot work in an ODT because there is no <w:p> entity in ODT.
You better use the TBS alias : "enlarge=tbs:p".
("comm" is deprectated)

Tell be if that fixes you problem.
By: ebizo
Date: 2016-10-04
Time: 14:12

Re: Multiple pages - lost image after second page

This change make only that page-break stop works.

Generally in this moment i don't have problem with blank page.
Problem with images is still in result odt but i ignore this because:
- OpenOffice works fine (all images)
- MS Office same
- when i do coversion for example by this http://document.online-convert.com/convert-to-docx to docx LibreOffice i can see all images
So i think it is Libre Bug, not OpenTBS.
By: Skrol29
Date: 2016-10-04
Time: 17:47

Re: Multiple pages - lost image after second page

Can you send to me your result ODT ?
By: ebizo
Date: 2016-10-04
Time: 22:34

Re: Multiple pages - lost image after second page

Sure, this is my old file:
http://ebizo.pl/ftp/pcd.odt
(pls, ignore blank page problem)
By: Skrol29
Date: 2016-10-06
Time: 09:44

Re: Multiple pages - lost image after second page

With LibreOffice 4.3.0.4 I can see the 5 images in your ODT.

What is your LibreOffice version ?
By: ebizo
Date: 2016-10-06
Time: 14:02

Re: Multiple pages - lost image after second page

Problem exists only with version 5.1.X and 5.2.X (latest version).
By: Skrol29
Date: 2016-10-10
Time: 16:19

Re: Multiple pages - lost image after second page

Hi,

The problem is due to attribute "draw:name" that is add to entity <draw:frame> in LibreOffice 5.
The next version of OpenTBS will fix this problem.

Meanwhile, the solution is to delete this attribute.
Here is a simple solution :
$TBS->Source = str_replace(' draw:name=', ' xxx=', $TBS->Source);
By: ebizo
Date: 2016-10-10
Time: 23:34

Re: Multiple pages - lost image after second page

Hi, thanks for help.

I confirm it works
By: cerhardt
Date: 2017-01-04
Time: 15:45

Re: Multiple pages - lost image after second page

I have the same problem with an image only appearing on the first two pages... but the fix doesn't help for me (LibreOffice 5.1.x).


This is my template:
[mydata.image;ope=changepic;block=tbs:page][mydata.pat_id]
[mydata.dna_nr]
[mydata.name]
[mydata.gebdat]

This is the array:
Array
(
    [0] => Array
        (
            [image] => /srv/redcap/htdocs/plugins/hih/qrcode.png
            [pat_id] => ID12345
            [dna_nr] => D27893
            [name] => NAME
            [gebdat] => *DATE
        )

    [1] => Array
        (
            [image] => /srv/redcap/htdocs/plugins/hih/qrcode.png
            [pat_id] => ID12346
            [dna_nr] => D27894
            [name] => NAME
            [gebdat] => *DATE
        )

    [2] => Array
        (
            [image] => /srv/redcap/htdocs/plugins/hih/qrcode.png
            [pat_id] => ID12347
            [dna_nr] => D27895
            [name] => NAME
            [gebdat] => *DATE
        )

)

This ist the XML debug output of the template:
    <text:p text:style-name="P4">
    <draw:frame draw:style-name="fr1" xxx="Bild1" text:anchor-type="paragraph" svg:x="0.037cm" svg:y="0.494cm" svg:width="0.499cm" svg:height="0.499cm" draw:z-index="0">
     <draw:image xlink:href="Pictures/opentbs_added_1.png" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"/>
    </draw:frame>
    ID12345
   </text:p>
   <text:p text:style-name="P3">
    D27893
   </text:p>
   <text:p text:style-name="P1">
    <text:soft-page-break/>
    NAME
   </text:p>
   <text:p text:style-name="P2">
    *DATE
   </text:p>
   <text:p text:style-name="P4">
    <draw:frame draw:style-name="fr1" xxx="Bild1" text:anchor-type="paragraph" svg:x="0.037cm" svg:y="0.494cm" svg:width="0.499cm" svg:height="0.499cm" draw:z-index="0">
     <draw:image xlink:href="Pictures/opentbs_added_1.png" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"/>
    </draw:frame>
    ID12346
   </text:p>
   <text:p text:style-name="P3">
    D27894
   </text:p>
   <text:p text:style-name="P1">
    <text:soft-page-break/>
    NAME
   </text:p>
   <text:p text:style-name="P2">
    *DATE
   </text:p>
   <text:p text:style-name="P4">
    <draw:frame draw:style-name="fr1" xxx="Bild1" text:anchor-type="paragraph" svg:x="0.037cm" svg:y="0.494cm" svg:width="0.499cm" svg:height="0.499cm" draw:z-index="0">
     <draw:image xlink:href="Pictures/opentbs_added_1.png" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"/>
    </draw:frame>
    ID12347
   </text:p>
   <text:p text:style-name="P3">
    D27895
   </text:p>
   <text:p text:style-name="P1">
    <text:soft-page-break/>
    NAME
   </text:p>
   <text:p text:style-name="P2">
    *DATE
   </text:p>

Thanks for any help,
Christian