Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // This generates a string like: '<svg>...</svg>'
- $svgString = getSvgStringFromSvgFile(session('svgFile'));
- $output = $snappy->getOutputFromHtml($svgString, [
- 'encoding' => 'utf-8',
- 'title' => session('svgTitle')
- ]);
- $output = base64_encode($output);
- return response()->json($output);
- <object data={'data:application/pdf;base64,' + pdfData} type="application/pdf">
- Your browser doesn't support pdf embedding.
- </object>
Add Comment
Please, Sign In to add comment