Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.7k views
in Technique[技术] by (71.8m points)

serialization - Serialize emf file using readAsDataUrl in javascript

I am working on a project where I need to import windows files (ppt, word, visio, etc) and need to convert the emf to pngs. I have the backend support via inkscape / php to handle the conversion, however, I have to POST to the BE using base64 encoded strings. So my usecase:

  1. POST serialized emf file to endpoint
  2. base64_decode the string, save a temp emf file and png
  3. Use inkscape to convert the emf to png.
  4. Return base64 string of png.

The biggest issue is that I believe the original encoding of the emf file isn't correctly serializing. Any thoughts? And, I can't post the actual emf image as a blob to the BE.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...