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

Merge with difference header and footer not working #4

Open
kongoon opened this issue Nov 11, 2022 · 1 comment
Open

Merge with difference header and footer not working #4

kongoon opened this issue Nov 11, 2022 · 1 comment

Comments

@kongoon
Copy link

kongoon commented Nov 11, 2022

Possible to merge difference header and footer?

@kongoon
Copy link
Author

kongoon commented Nov 11, 2022

This solution it's work for me

private function addAltChunk($refID, $addPageBreak)
	{
		$pagebreak = $addPageBreak ? '<w:p><w:pPr><w:sectPr><w:type w:val="nextPage" /></w:sectPr></w:pPr></w:p>' : ''; //'<w:p><w:r><w:br w:type="page" /></w:r></w:p>' : '';
		$xmlItem = $pagebreak . '<w:altChunk r:id="' . $refID . '"/>';

		$p = strpos($this->docxDocument, '</w:body>');
		$this->docxDocument = substr_replace($this->docxDocument, $xmlItem, $p, 0);
	}

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

No branches or pull requests

1 participant