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 Notes Breaks "Print Slide With Notes" #179

Closed
JewrassicPark opened this issue Jan 28, 2016 · 28 comments
Closed

Adding Notes Breaks "Print Slide With Notes" #179

JewrassicPark opened this issue Jan 28, 2016 · 28 comments
Assignees
Milestone

Comments

@JewrassicPark
Copy link
Contributor

You can print/save powerpoints that show the slide with the notes below it. Adding notes through phppresentation causes this feature to break and only the notes are displayed in the printout.

@Progi1984
Copy link
Member

@JewrassicPark Could you give us two files ?

  • a file generated with PHPPresentation with the bug
  • the same file where you have fixed the bug (opened in PowerPoint, and fixed in this one)

@JewrassicPark
Copy link
Contributor Author

The first file is generated and has the big.

I couldn't directly fix the bug in powerpoint. Once the slide was formatted this way I don't see a way to reset it so the bug isn't present. I included a second slide in the presentation that displays correctly.

notes-brokenpriview.pptx

notes-brokenpriview-fixed.pptx

@JewrassicPark
Copy link
Contributor Author

I've been able to modify the slide writer for powerpoint2007 to have the preview display but I'm having issue with the dimensions of the preview across formats.

Right now when you add a note you create a rich text shape in order to alter the text

$text = $note->createRichTextShape()->setHeight(300)->setWidth(600);
The slide writer uses the dimensions of that richtextshape to calculate the offsets and extents of the note, which are the dimensions used to display the preview. My issue is with getting the proper dynamic value for this for each powerpoint layout.

@JewrassicPark
Copy link
Contributor Author

I've updated my fork with the new writeNote function for the powerpoint2007 slide writer. I already have the pull request open for the animation, what's the best way to merge this as well?

Progi1984 added a commit to Progi1984/PHPPresentation that referenced this issue Feb 13, 2016
@Progi1984
Copy link
Member

@JewrassicPark I'll try to implement your patch.

Bug with Sample_09, that doesn't seem to work.

screen shot 02-13-16 at 10 30 am

Thanks for your help for fixing it before merging it :)

@Progi1984
Copy link
Member

@JewrassicPark Some news ?

1 similar comment
@Progi1984
Copy link
Member

@JewrassicPark Some news ?

@JewrassicPark
Copy link
Contributor Author

Sorry, what's the current issue on this? I can't produce any bugs in my print with notes currently. I still have inconsistent errors having notes at all though.

@Progi1984
Copy link
Member

@JewrassicPark Check this comment : #179 (comment)

@JewrassicPark
Copy link
Contributor Author

In your sample you have

$oRichText = $oNote->createRichTextShape()->setHeight(300)->setWidth(600)->setOffsetX(170)->setOffsetY(180);;

This is how I set the notes:

$layout = $objPHPPresentation->getLayout();
$layoutCX = $layout->getCX($layout::UNIT_PIXEL); 
$layoutCY = $layout->getCY($layout::UNIT_PIXEL); 
$oRichText = $oNote->createRichTextShape()->setHeight($layoutCY)->setWidth($layoutCX);

I changed only those lines in your sample and the notes looked correct for me.

@Progi1984
Copy link
Member

@JewrassicPark : But with theses changes : Progi1984@5c3e874 ?

@JewrassicPark
Copy link
Contributor Author

Sorry, yes, I am using that writer currently

@Progi1984 Progi1984 self-assigned this Mar 8, 2016
@Progi1984
Copy link
Member

@JewrassicPark Could you test this file : https://framadrop.org/r/Z3GR8dCTmY#OZ+pXMjw+koMEOUt9SrO3mb04pD+WdPOnuXtJNrAlcU=
?

Is it ok for you ? Thanks

@JewrassicPark
Copy link
Contributor Author

No, I get a repair notice when opening it (windows 10, office 2013) and I don't see any notes once the repair is complete.

@Progi1984
Copy link
Member

@JewrassicPark I think I'm better : i have no interfact in LibreOffice.

https://framadrop.org/r/6FrPIumUDA#9k8x+j2vP0UeZbFFQQ6OeNY4qF6qemN0JMOZ0gkmfew=

Thanks for your test.

@Progi1984
Copy link
Member

@JewrassicPark Some news ?

@JewrassicPark
Copy link
Contributor Author

I still don't see the slide in the notes print on yours. I'll take a look but since the only thing I changed in your example was the two lines above it's probably a difference in our code bases. I'm fairly certain I submitted everything that I added I'll try to double check

@Progi1984
Copy link
Member

@JewrassicPark Shit ! We are nearly to the solution.

What is the difference between your code and this branch : develop...Progi1984:issue179 ?

@JewrassicPark
Copy link
Contributor Author

This is the slide writer in powerpoint2007 that im currently using

https://framadrop.org/r/5lGC2h0D0n#PPNN/aGk23MMjN9VFmJsoh7ov5VHVZ7sC6PijvElYCM=

@Progi1984
Copy link
Member

@JewrassicPark I have made a simple change. Could you test : https://framadrop.org/r/mH8j3Nurmc#viqd4C7vkcsB+L/rGmLt0tY7nrWjLjSDIEOgYVZk4Vo= ?

Progi1984 added a commit to Progi1984/PHPPresentation that referenced this issue Mar 17, 2016
@JewrassicPark
Copy link
Contributor Author

Close:

The positioning is still off. Did you definitely make the changes in:

#179 (comment)

@Progi1984
Copy link
Member

@JewrassicPark I have done the change in sample :

https://framadrop.org/r/fhevpIMmxd#abbwOh9RbTjLOfhRHbVkRlhHemvqI4ewZe1tLtreBAY=

Could you test ?

Progi1984 added a commit to Progi1984/PHPPresentation that referenced this issue Mar 18, 2016
@JewrassicPark
Copy link
Contributor Author

Not quite

Progi1984 added a commit to Progi1984/PHPPresentation that referenced this issue Mar 22, 2016
Progi1984 added a commit to Progi1984/PHPPresentation that referenced this issue Mar 22, 2016
@Progi1984
Copy link
Member

Sample_09_SlideNote.pptx

$oRichText = $oNote->createRichTextShape()
    ->setHeight($oLayout->getCY($oLayout::UNIT_PIXEL))
    ->setWidth($oLayout->getCX($oLayout::UNIT_PIXEL))
    ->setOffsetX(0)
    ->setOffsetY(0);

screen shot 03-22-16 at 09 42 am

Sample_09_SlideNote.pptx

$oRichText = $oNote->createRichTextShape()
    ->setHeight($oLayout->getCY($oLayout::UNIT_PIXEL))
    ->setWidth($oLayout->getCX($oLayout::UNIT_PIXEL))
    ->setOffsetX(170)
    ->setOffsetY(180);

screen shot 03-22-16 at 09 43 am

@Progi1984
Copy link
Member

@JewrassicPark Just tested on Office2007. Could you test on your side with latest files ?

@Progi1984
Copy link
Member

@JewrassicPark Some news ?

@JewrassicPark
Copy link
Contributor Author

Yeah the two pages you linked here #179 (comment)

display the same for me as they do in your screenshots

Progi1984 added a commit to Progi1984/PHPPresentation that referenced this issue Mar 31, 2016
Progi1984 added a commit to Progi1984/PHPPresentation that referenced this issue Mar 31, 2016
Progi1984 added a commit to Progi1984/PHPPresentation that referenced this issue Mar 31, 2016
Progi1984 added a commit that referenced this issue Mar 31, 2016
#179 : Bugfix for printing slide notes
@Progi1984
Copy link
Member

Yeah ! Bug fixed :)

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

No branches or pull requests

2 participants