SVG images do not embed into PDF (under wine)

Please post all questions and comments regarding Help & Manual 7 here.

Moderators: Alexander Halser, Tim Green

SVG images do not embed into PDF (under wine)

Unread postby Dmitry Mikhirev » Mon Aug 26, 2019 2:25 pm

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.
nosvg.png

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. This may mean that you can't view them at all, or it may just mean that you need to log into the forum to view them.
Dmitry Mikhirev
 
Posts: 7
Joined: Thu Mar 28, 2019 7:24 pm

Re: SVG images do not embed into PDF (under wine)

Unread postby John Johann » Mon Aug 26, 2019 3:01 pm

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_working_graphics_svg.html
https://www.helpandmanual.com/help/hm_working_pdf_graphics.html
John Johann
 
Posts: 164
Joined: Mon Aug 21, 2017 7:35 pm

Re: SVG images do not embed into PDF (under wine)

Unread postby Dmitry Mikhirev » Mon Aug 26, 2019 3:20 pm

John Johann wrote:Is the svg file displayed correctly in H&M?
Is it in the Project search path?

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.
So the question transforms to "what should I install to enable SVG processing in H&M".
Dmitry Mikhirev
 
Posts: 7
Joined: Thu Mar 28, 2019 7:24 pm

Re: SVG images do not embed into PDF (under wine)

Unread postby Tim Green » Tue Aug 27, 2019 9:08 am

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. :?
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.
User avatar
Tim Green
Site Admin
 
Posts: 20935
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany

Re: SVG images do not embed into PDF (under wine)

Unread postby Dmitry Mikhirev » Tue Aug 27, 2019 11:14 am

Hi Tim!

Tim Green wrote:you should make sure that your version is up to date (7.5.2 Build 4720).

Yes, it is the latest version downloaded yesterday. I experienced the same issue with 7.5.1.

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. :?

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.
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.
Dmitry Mikhirev
 
Posts: 7
Joined: Thu Mar 28, 2019 7:24 pm

Re: SVG images do not embed into PDF (under wine)

Unread postby Alexander Halser » Wed Aug 28, 2019 7:35 am

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.


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.

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
User avatar
Alexander Halser
EC-Software Support
 
Posts: 3949
Joined: Mon Jun 24, 2002 7:24 pm
Location: Salzburg, Austria

Re: SVG images do not embed into PDF (under wine)

Unread postby Dmitry Mikhirev » Wed Aug 28, 2019 12:24 pm

Alexander Halser wrote:The SVG component uses GDIPlus to draw. If you can see the SVG in H&M, this part has worked.

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?
Dmitry Mikhirev
 
Posts: 7
Joined: Thu Mar 28, 2019 7:24 pm

Re: SVG images do not embed into PDF (under wine)

Unread postby Simon_Dismore » Wed Aug 28, 2019 12:41 pm

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.
Simon_Dismore
 
Posts: 131
Joined: Thu Jul 13, 2017 2:57 pm

Re: SVG images do not embed into PDF (under wine)

Unread postby Dmitry Mikhirev » Wed Sep 04, 2019 7:06 pm

Finally I noticed messages
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"

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.
Dmitry Mikhirev
 
Posts: 7
Joined: Thu Mar 28, 2019 7:24 pm


Return to Help & Manual 7 Forum

Who is online

Users browsing this forum: Google [Bot] and 6 guests