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

<w:pict> images are not replaced in DOCX template #670

Open
SuperPat45 opened this issue May 7, 2024 · 0 comments
Open

<w:pict> images are not replaced in DOCX template #670

SuperPat45 opened this issue May 7, 2024 · 0 comments

Comments

@SuperPat45
Copy link
Contributor

SuperPat45 commented May 7, 2024

Sometime image appear as a <w:pict> element in document.xml witch is not supported by XDocReport:

<w:bookmarkStart w:id="0" w:name="image1"/>
<w:r>
	<w:rPr>
		<w:noProof/>
	</w:rPr>
	<w:pict w14:anchorId="1E9F6AB7">
		<v:shape id="_x0000_i1025" type="#_x0000_t75" style="width:5in;height:559.5pt">
			<v:imagedata r:id="rId6" o:title="Image 1"/>
		</v:shape>
	</w:pict>
</w:r>
<w:bookmarkEnd w:id="0"/>

Instead of a <w:drawing> element :

<w:bookmarkStart w:id="0" w:name="image1"/>
<w:r>
	<w:rPr>
		<w:noProof/>
	</w:rPr>
	<w:drawing>
		<wp:inline distT="0" distB="0" distL="0" distR="0" wp14:anchorId="6741F81E" wp14:editId="52A9117C">
			<wp:extent cx="228632" cy="228632"/>
			<wp:effectExtent l="0" t="0" r="0" b="0"/>
			<wp:docPr id="2" name="Image 2"/>
			<wp:cNvGraphicFramePr>
				<a:graphicFrameLocks xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" noChangeAspect="1"/>
			</wp:cNvGraphicFramePr>
			<a:graphic xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main">
				<a:graphicData uri="http://schemas.openxmlformats.org/drawingml/2006/picture">
					<pic:pic xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture">
						<pic:nvPicPr>
							<pic:cNvPr id="2" name="Image 1"/>
							<pic:cNvPicPr/>
						</pic:nvPicPr>
						<pic:blipFill>
							<a:blip r:embed="rId4">
								<a:extLst>
									<a:ext uri="{28A0092B-C50C-407E-A947-70E740481C1C}">
										<a14:useLocalDpi xmlns:a14="http://schemas.microsoft.com/office/drawing/2010/main" val="0"/>
									</a:ext>
								</a:extLst>
							</a:blip>
							<a:stretch>
								<a:fillRect/>
							</a:stretch>
						</pic:blipFill>
						<pic:spPr>
							<a:xfrm>
								<a:off x="0" y="0"/>
								<a:ext cx="228632" cy="228632"/>
							</a:xfrm>
							<a:prstGeom prst="rect">
								<a:avLst/>
							</a:prstGeom>
						</pic:spPr>
					</pic:pic>
				</a:graphicData>
			</a:graphic>
		</wp:inline>
	</w:drawing>
</w:r>
<w:bookmarkEnd w:id="0"/>

XDocReport need to support <w:pict> image replacement or eventually convert the <w:pict> in <w:drawing> during generation.

I don't understand when it create <w:pict> instead of <w:drawing>.

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