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

Adding an image to a slide gives me a blank image object #7

Open
ed1023 opened this issue Jul 9, 2013 · 7 comments
Open

Adding an image to a slide gives me a blank image object #7

ed1023 opened this issue Jul 9, 2013 · 7 comments
Milestone

Comments

@ed1023
Copy link

ed1023 commented Jul 9, 2013

I must be doing something wrong, but when I try to add an image to a slide then i down load and open the ppt i get a blank image shape in the slide.

I am running the latest version of phppowerpoint from trunk.

and here is the code I am using to create my slide with image:

    //creating next slide
    $currentSlide = $powerpoint->getActiveSlide();
    $slide = $powerpoint->createSlide();
    $shape = $slide->createRichTextShape();
    $shape->setHeight(200);
    $shape->setWidth(900);
    $shape->setOffsetX(30);
    $shape->setOffsetY(50);
    $shape->getAlignment()->setHorizontal( PHPPowerPoint_Style_Alignment::HORIZONTAL_CENTER );
    $textRun = $shape->createTextRun("Numbers of Cases and proportion (%) of Any FASD in " .  $_SESSION["NUMBIRTHS"] . " Women from ". $_SESSION["LOCATION"] . " in " . $_SESSION["DATE"] . ".");
    $textRun->getFont()->setBold(true);
    $textRun->getFont()->setSize(30);
    $textRun->getFont()->setColor( new PHPPowerPoint_Style_Color( '555555' ) );
    //adding an image to the slide
    $shape2 = $slide->createDrawingShape();
    $shape2->setName('Alcohol Exposure');
    $shape2->setDescription('Pie Chart');
    $shape2->setPath('./pictures/51dab21966436.jpg');
    $shape2->setHeight(170);
    $shape2->setOffsetX(100);
    $shape2->setOffsetY(100); 

If any one can tell me where I am going off the path or give me some pointers I would be grateful.

-Joel

@Progi1984 Progi1984 added this to the 0.1.1 milestone Mar 7, 2014
@Progi1984 Progi1984 self-assigned this Jul 8, 2014
@Progi1984
Copy link
Member

Hi @ed1023, could you test with the last version of the develop branch ?

Because I test your code with this one and PPTX (or ODP) display correctly.

@Progi1984 Progi1984 modified the milestones: 0.2.0, 0.3.0 Jul 21, 2014
@Progi1984 Progi1984 removed their assignment Jul 31, 2014
@Progi1984 Progi1984 modified the milestones: 0.3.0, Waiting For Answer Sep 10, 2014
@Progi1984
Copy link
Member

@ed1023 Some news ?

1 similar comment
@Progi1984
Copy link
Member

@ed1023 Some news ?

@Progi1984
Copy link
Member

@ed1023 PHPPowerPoint 0.4.0 has been released. I would like to solve your issue for 0.5.0. Could you answer to my question ?

@Progi1984
Copy link
Member

@ed1023 PHPPowerPoint 0.6.0 has been released. I would like to solve your issue for 0.7.0. Could you answer to my question ?

@Kieryn19
Copy link

Kieryn19 commented Sep 2, 2016

Hi,
I have a similar issue. It appears to only be a problem in Office 2013.

I am inserting a PDF into a slide and it works fine except in office 2013. there is an error: "this image cannot currently be displayed"

If i open it in a later version of office, save it, then open it in 2013 again it works fine. This would suggest that there is something 2013 doesn't like about the generated file.

@Progi1984 Progi1984 modified the milestones: 0.8.0, Waiting For Answer Sep 4, 2016
@Progi1984
Copy link
Member

@ed1023 Have you got the problem with the latest version of the develop branch ?

@Progi1984 Progi1984 modified the milestones: 0.8.0, 0.9.0 Apr 3, 2017
@Progi1984 Progi1984 removed this from the 0.8.0 milestone Apr 3, 2017
@Progi1984 Progi1984 modified the milestones: 0.9.0, 0.10.0 Jul 5, 2017
Progi1984 added a commit that referenced this issue Jun 9, 2019
@Progi1984 Progi1984 modified the milestones: 1.0.0, 1.1.0 Sep 9, 2021
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