SVG images do not embed into PDF (under wine)
Moderators: Alexander Halser, Tim Green
-
- Posts: 7
- Joined: Thu Mar 28, 2019 7:24 pm
SVG images do not embed into PDF (under wine)
Hello!
I'm trying to export a project to PDF from H&M 7 running under wine. The result is satisfactory with one exception: SVG images are replaced with a white square with a red cross. Can you suggest how to investigate the root of this issue? Does SVG embedding rely on some external program or DLL that can be missing? Is there a way to obtain some info from H&M about why does embedding not work? Are there some settings determining SVG behavior in PDF (like those for embedded fonts)?
I'm trying to export a project to PDF from H&M 7 running under wine. The result is satisfactory with one exception: SVG images are replaced with a white square with a red cross. Can you suggest how to investigate the root of this issue? Does SVG embedding rely on some external program or DLL that can be missing? Is there a way to obtain some info from H&M about why does embedding not work? Are there some settings determining SVG behavior in PDF (like those for embedded fonts)?
You do not have the required permissions to view the files attached to this post.
-
- Posts: 305
- Joined: Mon Aug 21, 2017 7:35 pm
Re: SVG images do not embed into PDF (under wine)
Is the svg file displayed correctly in H&M?
Is it in the Project search path?
You'll also find info in the online help here:
https://www.helpandmanual.com/help/hm_w ... s_svg.html
https://www.helpandmanual.com/help/hm_w ... phics.html
Is it in the Project search path?
You'll also find info in the online help here:
https://www.helpandmanual.com/help/hm_w ... s_svg.html
https://www.helpandmanual.com/help/hm_w ... phics.html
-
- Posts: 7
- Joined: Thu Mar 28, 2019 7:24 pm
Re: SVG images do not embed into PDF (under wine)
Oops… You are right, it is also not displayed in H&M. But it is in the search path, if I point the mouse cursor to it, the file path is shown correctly, and SVG is displayed properly in the exported HTML.John Johann wrote:Is the svg file displayed correctly in H&M?
Is it in the Project search path?
So the question transforms to "what should I install to enable SVG processing in H&M".
- Tim Green
- Site Admin
- Posts: 23183
- Joined: Mon Jun 24, 2002 9:11 am
- Location: Bruehl, Germany
- Contact:
Re: SVG images do not embed into PDF (under wine)
Hi Dmitry,
Help+Manual 7 supports SVG, also in PDF, but you should make sure that your version is up to date (7.5.2 Build 4720). However, it won't support all SVG files. Some will not work, and some will be rendered incorrectly. This is because of the inherently complex nature of SVG.
So the first thing to do would be to try some different SVGs, some simpler ones if possible. You should also experiment with the same SVGs on a real copy of Windows running on real hardware. WINE is nice when it works, but in addition to not being an emulator it is also not Windows, and you can't expect it to provide all the resources that all programs need.
Help+Manual 7 supports SVG, also in PDF, but you should make sure that your version is up to date (7.5.2 Build 4720). However, it won't support all SVG files. Some will not work, and some will be rendered incorrectly. This is because of the inherently complex nature of SVG.
So the first thing to do would be to try some different SVGs, some simpler ones if possible. You should also experiment with the same SVGs on a real copy of Windows running on real hardware. WINE is nice when it works, but in addition to not being an emulator it is also not Windows, and you can't expect it to provide all the resources that all programs need.
Regards,
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
-
- Posts: 7
- Joined: Thu Mar 28, 2019 7:24 pm
Re: SVG images do not embed into PDF (under wine)
Hi Tim!
Can you describe what dlls/functions H&M uses to draw SVGs? Tracing calls and trying to guess is not very effective, moreover I'm not familiar with winapi.
Yes, it is the latest version downloaded yesterday. I experienced the same issue with 7.5.1.Tim Green wrote:you should make sure that your version is up to date (7.5.2 Build 4720).
This is an old project, and it has been published from Windows many times. PDFs generated there are fine, this is a wine-only trouble.Tim Green wrote:So the first thing to do would be to try some different SVGs, some simpler ones if possible. You should also experiment with the same SVGs on a real copy of Windows running on real hardware. WINE is nice when it works, but in addition to not being an emulator it is also not Windows, and you can't expect it to provide all the resources that all programs need.
Can you describe what dlls/functions H&M uses to draw SVGs? Tracing calls and trying to guess is not very effective, moreover I'm not familiar with winapi.
- Alexander Halser
- EC-Software Support
- Posts: 4105
- Joined: Mon Jun 24, 2002 7:24 pm
- Location: Salzburg, Austria
- Contact:
Re: SVG images do not embed into PDF (under wine)
The SVG component uses GDIPlus to draw. If you can see the SVG in H&M, this part has worked. When creating a PDF, the SVG draws itself on an Enhanced Metafile (EMF) in memory. This is an EMF but not an EMF"plus". When all pages of the PDF are rendered as a series of EMFs, the EMFs are played back to create the PDF file from the drawing commands.Can you describe what dlls/functions H&M uses to draw SVGs? Tracing calls and trying to guess is not very effective, moreover I'm not familiar with winapi.
When Windows draws GDI+ commands onto an EMF (not +), these commands are effectively converted into their GDI (not +) equivalents. This conversion probably fails on Wine.
Alexander Halser
Senior Software Architect, EC Software GmbH
Senior Software Architect, EC Software GmbH
-
- Posts: 7
- Joined: Thu Mar 28, 2019 7:24 pm
Re: SVG images do not embed into PDF (under wine)
Actually, this does not work too (SVGs are not displayed in H&M), although I already installed gdiplus using winetricks (there were some warning messages before that). Maybe the problem is not in drawing, but in parsing SVGs?Alexander Halser wrote:The SVG component uses GDIPlus to draw. If you can see the SVG in H&M, this part has worked.
-
- Posts: 206
- Joined: Thu Jul 13, 2017 2:57 pm
Re: SVG images do not embed into PDF (under wine)
It might be a good idea to get in touch with Martin Wynne – he's probably the most expert (and helpful) H+M user around and I think has a lot of experience publishing to Wine.
-
- Posts: 7
- Joined: Thu Mar 28, 2019 7:24 pm
Re: SVG images do not embed into PDF (under wine)
Finally I noticed messages
when opened another project. The issue can be solved by installing any of msxml4 or msxml6 with winetricks. gdiplus is also required, without it svgs are drawn with artifacts.
Code: Select all
0009:err:module:find_forwarded_export module not found for forward 'msxml3.DllGetClassObject' used by L"C:\\windows\\system32\\msxml6.dll"
0009:err:module:find_forwarded_export module not found for forward 'msxml3.DllGetClassObject' used by L"C:\\windows\\system32\\msxml4.dll"
0009:err:module:find_forwarded_export module not found for forward 'msxml3.DllGetClassObject' used by L"C:\\windows\\system32\\msxml2.dll"