custom svg not displaying properly in fluttericon - flutter

I am trying to create custom icons (so svgs) in Adobe Illustrator for flutter so I am trying to load svg files into fluttericon. However, once I upload the svg file to fluttericon it only shows an outline and the actual symbol is not showing.
In Illustrator, I tried to Saves as SVG, Export as SVG and Exports for Screens -> SVG but none of them seem to work.
Am I missing something? If I upload another svg I got online it works perfectly fine.

I figured it out: In Illustrator, you need to turn the shapes into a compound path first and then export as svg (Object -> Compound path -> make). That way it shows up fine in fluttericon.
fluttericon has a good explanation for that as well: https://github.com/fontello/fontello/wiki/How-to-use-custom-images#importing-svg-images

Related

How to add an image to a pdf using Capacitor pdf-generator plugin

I’m using capacitor pdf-generator plugin to create a pdf. I managed to do so as long as the html code is limited to non image tag, code in which I inject some dynamic data by nesting variable using ${ }.
Now, my aim is to bind the src attribute of an ```img`` tag to a variable so that I can change the logo displayed in the created PDF.
Where I fail: what appears on the PDF is a white space with dashed borders (check picture attached). So I guess that the path must be correct because if not it would show the missing icon (issue I went through before I could format correctly the path).
Anyone who already had that trouble?
Finally bypassed this issue by storing the base64 data when selecting a logo and using it directly in the img tag.
<img src="data:image/png;base64,${base64data} " />
You can convert the images to base64 here https://www.base64-image.de/
then add the codes directly to your image tag

Flutter web: SVG in Firefox

Does someone know a way to display a SVG in Firefox using Flutter.
I tried using websafe_svg. It works great apart from Firefox, the images are not visible.
Using flutter_svg in addition with --dart-define=FLUTTER_WEB_USE_SKIA=true behind flutter run seems to work for me.
every thing depends on your SVG Format ... and I think best way is Changing Svg to a Right Format that you tested ...
I always use Adobe Illustrator for changing svgs Format. and below Format Working For Me on Both Android And Web... (Use Adobe Illustrator Action for saving Time )

Create And Display A PDF File In Ionic 3

How to create PDF file and display as per our design.
customize PDF layout and add image and table create in PDF file.
i have send image this type i want to create pdf file .
Here is plugin called pdfmake. It will help you to create pdf of images. You can customise many of things for creating pdf like page size, table, fonts etc.
Following are some of the tutorial which will help you to guide :
https://medium.com/#rakeshuce1990/ionic-how-to-create-pdf-file-with-pdfmake-step-by-step-75b25aa541a4
https://ionicacademy.com/create-pdf-files-ionic-pdfmake/
I have used it in my project to creating pdf of images and working properly, so may it will help you.

Rendering Images inside PDF, images not being rendered in PDF Viewer 0.1.8

Please check updates as they have additional informations... Apparently located the problem in a specific pdf client but cannot close the issue with an open bounty...
I am generating a pdf using grails rendering plugin. The PDF has a couple of images inside and "some" of them are not being outputted!
I am rendering the images inline via data uris as required by the plugin. That means that all my images are something like:
<img src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQECWAJYAAD...">
If I render them in a normal html view, I can see the images just fine!
If I render the template to a JPG/PNG with the same plugin, again the images render all fine.
If I render to PDF the images which are being retrieved by an octed-stream are broken!
Something like:
Looks like the image started to render and then something happened...
It is happening on the big-sized images, but also on the thumbnail version of same image.
Any one has some hints as why this might occur?
UPDATE
The file which does not show up is a file with mime application/octet-stream
So apparently I can retrieve the bytes from the file, but when they transmitted for PDF Rendering, the image does not appear...
Yet another update
The issue seems to be related with the PDF Viewer. Was using a Linux based PDF Viewer (PDF Viewer 0.1.8) and specific images are broken. In all other PDF Viewers I could test everything works fine.
Cannot close the issue as there is a bounty open :( Sorry that the bounty and question seems meaningless now, but you never know, someone might have an idea how to solve this even for PDF Viewer 0.1.8.
<img src="data:image/jpg;base64,/9j/4AAQSkZJRgABAQECWAJYAAD...">
works fine for me. Note the missing "e".
You can use rendering tag:
<rendering:inlineJpeg bytes="${your-image}" />
Make sure you decodeBase64() your image.

How to render all kinds of SVG files on iPhone?

For rendering svg file on iPhone I have downloaded a project from GitHub
SVGQuartzRenderer
but it shows the following errors:
UIKit/UIKit.h No such file or directory
(I am not able to add it using add existing frameworks)
Libxml/tree.h:No such file or directory
Expected specifier-qualifier list before xmlParserCtxtPtr
Does anyone know how I can make this project work?
I have also found another framework:
SVGKit.
It works well for some SVG files but not for all.
Is it possible to render any SVG file in iPhone without using UIWebView and are there any tutorials or sample code?
Starting Xcode 12, you can add the .svg file in your Assets Catalog and do this:
let image = UIImage(named: "SomeSVGImage")
ref: https://developer.apple.com/documentation/xcode-release-notes/xcode-12-beta-release-notes