Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

addImage and addrow #227

Closed
cocorem opened this issue May 6, 2014 · 20 comments
Closed

addImage and addrow #227

cocorem opened this issue May 6, 2014 · 20 comments
Assignees
Milestone

Comments

@cocorem
Copy link

cocorem commented May 6, 2014

Hi
I have two view very different of the same document , depending which Word open it
The row of table and the image are not the same
Why ?

im1
im2
tab1
tab2

Part of my code
$table->addRow(250,array("exactHeight"=>true));

Thanks
$section->addImage("FoyerPEChart".$ClientID.".png", array('width'=>459, 'height'=>174, 'align'=>'left'));

@Progi1984 Progi1984 added the Bug label May 6, 2014
@ivanlanin
Copy link
Contributor

So, combining this code with #224, you have:

$table = $section->addTable();
$table->addRow(200,null);
$table->addCell(1300)->addImage("FoyerChart".$ClientID.".png",
    array('width'=>600, 'height'=>200, 'align'=>'left'));

And

$section->addImage("FoyerPEChart".$ClientID.".png",
    array('width'=>459, 'height'=>174, 'align'=>'left'));

Correct?

@cocorem
Copy link
Author

cocorem commented May 6, 2014

this code

$table->addRow(250,array("exactHeight"=>true));
$table->addCell(8000)->addText($libelle,'policetext');

it's for the table
and I try this

$section->addImage("FoyerPEChart".$ClientID.".png",
  array('width'=>459, 'height'=>174, 'align'=>'left'));

and this

$table = $section->addTable();
$table->addRow(200,null);
$table->addCell(1300)->addImage("FoyerChart".$ClientID.".png",
  array('width'=>600, 'height'=>200, 'align'=>'left'));

for image but I have the same pb ....
and this

@ivanlanin
Copy link
Contributor

Look at your addImage method. They don't have the same size. Try this:

$section->addImage("FoyerPEChart".$ClientID.".png",
    array('width'=>459, 'height'=>174, 'align'=>'left'));

And

$table = $section->addTable();
$table->addRow(200,null);
$table->addCell(1300)->addImage("FoyerChart".$ClientID.".png",
    array('width'=>459, 'height'=>174, 'align'=>'left'));

@cocorem
Copy link
Author

cocorem commented May 6, 2014

No sorry I generate the document with the same instruction
this one for the 2 documents

$section->addImage("FoyerPEChart".$ClientID.".png",
array('width'=>459, 'height'=>174, 'align'=>'left'));

or this one for the 2 documents
$table = $section->addTable();$table->addRow(200,null);$table->addCell(1300)->addImage("FoyerChart".$ClientID.".png",
array('width'=>600, 'height'=>200, 'align'=>'left'));
But the 2 methods give the same pb

the images don't look the same

2014-05-06 9:38 GMT+02:00 Ivan Lanin [email protected]:

Look at your addImage method. They don't have the same size. Try this:

$section->addImage("FoyerPEChart".$ClientID.".png",
array('width'=>459, 'height'=>174, 'align'=>'left'));

And

$table = $section->addTable();$table->addRow(200,null);$table->addCell(1300)->addImage("FoyerChart".$ClientID.".png",

array('width'=>459, 'height'=>174, 'align'=>'left'));


Reply to this email directly or view it on GitHubhttps://github.com//issues/227#issuecomment-42274818
.

Cordialement,

Corinne Zaoui

@Progi1984
Copy link
Member

What is the difference between two Words ? Version ? Plugins ? Anything else ?

@cocorem
Copy link
Author

cocorem commented May 6, 2014

One it's Microsoft Office 2010 for windows
The other one it's for mac
But this document must be generate by a lot of personns also I need that
all are the same

2014-05-06 10:05 GMT+02:00 Progi1984 [email protected]:

What is the difference between two Words ? Version ? Plugins ? Anything
else ?


Reply to this email directly or view it on GitHubhttps://github.com//issues/227#issuecomment-42276430
.

Cordialement,

Corinne Zaoui

@cocorem
Copy link
Author

cocorem commented May 6, 2014

for mac it's
Macintosh 2008

2014-05-06 10:38 GMT+02:00 corinne zaoui [email protected]:

One it's Microsoft Office 2010 for windows
The other one it's for mac
But this document must be generate by a lot of personns also I need that
all are the same

2014-05-06 10:05 GMT+02:00 Progi1984 [email protected]:

What is the difference between two Words ? Version ? Plugins ? Anything

else ?


Reply to this email directly or view it on GitHubhttps://github.com//issues/227#issuecomment-42276430
.

Cordialement,

Corinne Zaoui

Cordialement,

Corinne Zaoui

@ivanlanin
Copy link
Contributor

Let me clarify. So in MS Office 2010 for Windows the images look the same, but in MS Office 2008 for Mac they don't?

I don't think anybody ever test in MS Office for Mac before, so there's a big possibility that the rendering rule is different.

@cocorem
Copy link
Author

cocorem commented May 6, 2014

No exactly
I compare the image and the table between the rendering by the 2 offices
The rendering is not the same, very different

I think that when you fixe the height of the row or the size of the image
the rendering would be the same for all the office version

2014-05-06 11:58 GMT+02:00 Ivan Lanin [email protected]:

Let me clarify. So in MS Office 2010 for Windows the images look the same,
but in MS Office 2008 for Mac they don't?

I don't think anybody ever test in MS Office for Mac before, so there's a
big possibility that the rendering rule is different.


Reply to this email directly or view it on GitHubhttps://github.com//issues/227#issuecomment-42284551
.

Cordialement,

Corinne Zaoui

@ivanlanin
Copy link
Contributor

I'll try to find a Mac to reproduce your problem.

@cocorem
Copy link
Author

cocorem commented May 6, 2014

Thanks a lot

2014-05-06 12:22 GMT+02:00 Ivan Lanin [email protected]:

I'll try to find a Mac to reproduce your problem.


Reply to this email directly or view it on GitHubhttps://github.com//issues/227#issuecomment-42286227
.

Cordialement,

Corinne Zaoui

@Progi1984 Progi1984 added this to the 0.11.0 milestone May 6, 2014
@cocorem
Copy link
Author

cocorem commented May 6, 2014

it seems word 2010 for windows doesn't take into consideration the height
given in
$table->addRow(100,array("exactHeight" => true));

whatever i specify as heigh, i get the same table format.

when opening the table within word, the line heigh is specified as "at
least" instead of exactt
Thanks

2014-05-06 12:30 GMT+02:00 corinne zaoui [email protected]:

Thanks a lot

2014-05-06 12:22 GMT+02:00 Ivan Lanin [email protected]:

I'll try to find a Mac to reproduce your problem.


Reply to this email directly or view it on GitHubhttps://github.com//issues/227#issuecomment-42286227
.

Cordialement,

Corinne Zaoui

Cordialement,

Corinne Zaoui

@ivanlanin
Copy link
Contributor

Can you run samples/Sample_21_TableRowRules.php and see if the same problem exists? Thanks.

@cocorem
Copy link
Author

cocorem commented May 8, 2014

I don' t understand that I obtain comparate at the php

2014-05-08 8:04 GMT+02:00 Ivan Lanin [email protected]:

Can you run samples/Sample_21_TableRowRules.php and see if the same
problem exists? Thanks.


Reply to this email directly or view it on GitHubhttps://github.com//issues/227#issuecomment-42516169
.

Cordialement,

Corinne Zaoui

@cocorem
Copy link
Author

cocorem commented May 8, 2014

I don' t understand that I obtain comparate at the php

2014-05-08 8:49 GMT+02:00 corinne zaoui [email protected]:

I don' t understand that I obtain comparate at the php

2014-05-08 8:04 GMT+02:00 Ivan Lanin [email protected]:

Can you run samples/Sample_21_TableRowRules.php and see if the same
problem exists? Thanks.


Reply to this email directly or view it on GitHubhttps://github.com//issues/227#issuecomment-42516169
.

Cordialement,

Corinne Zaoui

Cordialement,

Corinne Zaoui

@ivanlanin
Copy link
Contributor

There's a file named Sample_21_TableRowRules.php in the samples folder of PhpWord that contains usage sample of exactHeight. Please try to run the file and open the resulting Word document in both Office for Windows and Mac. See if you still get them rendered differently.

@cocorem
Copy link
Author

cocorem commented May 9, 2014

In windows the resultat is good
But I use now the last release 10 . Before I have pb with release 9
I have now the same result with windows and mac for the row
thanks

2014-05-08 17:50 GMT+02:00 Ivan Lanin [email protected]:

There's a file named Sample_21_TableRowRules.php in the samples folder of
PhpWord that contains usage sample of exactHeight. Please try to run the
file and open the resulting Word document in both Office for Windows and
Mac. See if you still get them rendered differently.


Reply to this email directly or view it on GitHubhttps://github.com//issues/227#issuecomment-42566917
.

Cordialement,

Corinne Zaoui

@ivanlanin
Copy link
Contributor

So, the problem you're facing is solved when you're using release 10?

@cocorem
Copy link
Author

cocorem commented May 9, 2014

Yes this one is solved with the release 10
Thanks

2014-05-09 6:10 GMT+02:00 Ivan Lanin [email protected]:

So, the problem you're facing is solved when you're using release 10?


Reply to this email directly or view it on GitHubhttps://github.com//issues/227#issuecomment-42631888
.

Cordialement,

Corinne Zaoui

@ivanlanin
Copy link
Contributor

Ok. Thanks for this confirmation. I'll close this issue. Please don't hesitate to submit reports like this since your feedback as a user is very useful for us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants