iink SDK Web

Answered

Server-Side *.iink file export

Dear MyScript team,


is there a way to export an *.iink file on server side? I mean to export the data from the *.iink file to any format (word, html, png ...) preferred in C#.


We want this, because we need this exported files on server side but we dont want to send each format over the internet to avoid a lot of data traffic.


Thank you

Regards,

Lukas Kopf


Best Answer

Dear Lukas,


currently, this cannot be done on our server.


We nevertheless note the idea, and keep you updated if it is available one day.


Now, to answer your other questions:

How do i get the contentBlock from a *.iink file?

>>You can set the "null" value


Which values are recommended for the Renderer(dpiX, dpiY, ...)

>>You must set the resolution of your input device (e.g. touch screen, tablet...)


Best regards,


Olivier


Dear Lukas,


Thank you for contacting us.


You can indeed export the data using the "export_" method: https://developer.myscript.com/docs/interactive-ink/1.3/web/myscriptjs/import-and-export/#exporting-content


You can find the export formats at the following link: https://developer.myscript.com/docs/interactive-ink/1.3/overview/import-and-export-formats/


We want this, because we need this exported files on server side but we  dont want to send each format over the internet to avoid a lot of data  traffic

I am not sure to understand. Indeed, you can call the "export_" method only when you prefer?


Best regards,


Olivier

Hi Olivier, 

with the help of your iOS-IInkUIReferenceImplementation we are of course able to call the "export" method. But then the exported files are on the iOS device. So we need to send all these exported files and the original *.iink file to our web servers.

e.g: A user creates a big text document with large images results in 20MB. Now we have to export this text document on the device in a *.html and a *.docx file. So on the device we have 3 files (*.iink, *.html, *.docx). Together these files are about 60MB. To store this files on our server they have to be sent over the internet to our web servers. So we use 60MB from the users mobile data volume and it takes quite a while to transfer the data.

We want to avoid this by only transfer the *.ink file (20MB) from the iOS device to our web server. Once the web server receives the file he itself calls the "export_" method to creates the *.html and the *.docx files.

So our question is if there's any possibility to call the "export_" method in our web server code without UI.

I have the following pseudo code writen with your nuget package 'MyScript.InteractiveInk.Wpf 1.3.0'


            var engine = Engine.Create(cert);

            var package = engine.OpenPackage(pathToIinkFile);

            var part = package.GetPart(0);

            var contentBlock = ???

            var editor = engine.CreateEditor(engine.CreateRenderer(96, 96, new RenderTarget())); 

            editor.Export_(contentBlock, pathToHtmlFile, MimeType.HTML);


  • How do i get the contentBlock from a *.iink file?
  • Which values are recommended for the Renderer(dpiX, dpiY, ...)


Thanks

Regards,

 

Lukas Kopf

Answer

Dear Lukas,


currently, this cannot be done on our server.


We nevertheless note the idea, and keep you updated if it is available one day.


Now, to answer your other questions:

How do i get the contentBlock from a *.iink file?

>>You can set the "null" value


Which values are recommended for the Renderer(dpiX, dpiY, ...)

>>You must set the resolution of your input device (e.g. touch screen, tablet...)


Best regards,


Olivier