Jump to content
Unity Insider Forum

WebGL: Bilder in eine PDF laden


Recommended Posts

Hallo zusammen,
ich habe folgendes Problem:
Ich habe Bilder in Form von Byte Arrays in meiner Anwendung. Diese Bilder möchte ich gerne in eine PDF Datei zusammenfügen (In welcher Form, die PDF aussehen soll ist erstmal egal).

Als Lösung dachte ich mir, dass ich einfach die Bibliothek MigraDoc verwenden kann. Da das Projekt, aber eine WebGL Anwendung ist, funktioniert MigraDoc nicht, beziehungsweise das PDF-Rendering von MigraDoc funktioniert nicht.

Hat jemand eine alternative Idee, wie ich die Bilder in eine PDF bekomme in meiner WebGL Anwendung?

Aller beste Grüße und schonmal vielen lieben Dank
Tobi

Link to comment
Share on other sites

  • 1 month later...

Im englisch-sprachigen Unity-Forum habe ich folgende Antwort auf mein Problem bekommen, die ich euch nicht vorenthalten möchte:

"A hacked together way we allowed for pdf exports on our WebGL app was to have a .jslib file that generates the information we wanted (text and images) onto the webpage below the unity container. That information was encapsulated in an HTML element and then we generate a "Print" button that will use the browser's print dialogue to print only that element. Not elegant in the least, but does what we need it to do." Quelle: Englischer Post

Das ganze hat funktioniert und reicht auch erstmal für meine Zwecke aus.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...