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

libemf2svg doesn't handle EMF+ records conversion #12

Open
ofirdev opened this issue May 12, 2017 · 9 comments
Open

libemf2svg doesn't handle EMF+ records conversion #12

ofirdev opened this issue May 12, 2017 · 9 comments

Comments

@ofirdev
Copy link

ofirdev commented May 12, 2017

I'm getting an empty SVG when converting this EMF taken from here.

@kakwa
Copy link
Owner

kakwa commented May 12, 2017

libemf2svg doesn't handle EMF+ records as of now:

https://github.com/kakwa/libemf2svg#emfemf-record-type-coverage

Maybe in a few years when most of the bugs in EMF (not +) are solved :).

There are tons of things I need to fix, the first that comes to my mind is the handling of clipping forms.

Actually this test file seems to be coming from http://libuemf.sourceforge.net/ which I use for EMF record parsing.

Renaming the bug to a more accurate name.

@kakwa kakwa changed the title Empty SVG libemf2svg doesn't handle EMF+ records conversion May 12, 2017
@ofirdev
Copy link
Author

ofirdev commented Jun 9, 2017

Is it possible to have a flag that check if the file is supported before converting?
That way I can fallback to LibreOffice if the file has EMF+ records.
The readme has the --emfplus flag but I'm not sure what it does.

@kakwa
Copy link
Owner

kakwa commented Jun 9, 2017

The emfplus flag enable the parsing of EMF+ records (FYI, EMF+ records are put inside EMF Comment records).
Right now, all it does is displaying the records content in verbose mode, it doesn't handle any conversion.

@ofirdev
Copy link
Author

ofirdev commented Jun 9, 2017

Is it possible to detect a file with EMF+ records or output an error in case there are unsupported records?

@kakwa
Copy link
Owner

kakwa commented Jun 9, 2017

Technically, it's possible:
parsing of the document, inspect EMF comment records to see if it has EMF+ flag.
It's not that complex, but it's not implemented yet.

@kakwa
Copy link
Owner

kakwa commented Jun 12, 2017

I've implemented it:

833e2f7

@ofirdev
Copy link
Author

ofirdev commented Jun 13, 2017

Thanks.
Is it possible to use this function from the command line?

@kakwa
Copy link
Owner

kakwa commented Jun 13, 2017

No, but you can easily create a small C code to have your own check based on the following code:

https://github.com/kakwa/libemf2svg/blob/master/goodies/check_emfp.c

@ofirdev
Copy link
Author

ofirdev commented Jun 13, 2017

Great, thanks.

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

2 participants