Guest User

Untitled

a guest
Oct 17th, 2018
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. // This generates a string like: '<svg>...</svg>'
  2. $svgString = getSvgStringFromSvgFile(session('svgFile'));
  3.  
  4. $output = $snappy->getOutputFromHtml($svgString, [
  5. 'encoding' => 'utf-8',
  6. 'title' => session('svgTitle')
  7. ]);
  8. $output = base64_encode($output);
  9.  
  10. return response()->json($output);
  11.  
  12. <object data={'data:application/pdf;base64,' + pdfData} type="application/pdf">
  13. Your browser doesn't support pdf embedding.
  14. </object>
Add Comment
Please, Sign In to add comment