After searching more than 3 hrs to know how to implement text detection using google API i decided to write this post, hope it help c# developer to know how to use and implement Vision API, Source Code : https://github.com/msm2020/OCR-google-APIs 1- Create server key on google console Go to http://console.developers.google.com/ and create new project or use existing project From Overview page enable vision API You need to create new bill information to use vision API, it's fully free for 1st 1000 request/ month you can check https://cloud.google.com/vision/docs/pricing After Enable Google Cloud Vision API go to Credentials page and create new server key Create key by fill all requested data and download Json file 2- Create Visual studio project I'll use vs 2015 and .NET framework 4.5 Add google Nuget packages : Google.Apis.Vision.v1 by right click on project and then manage nuget ...
With some versions of Visual studio when you try to make version auto number sometimes it get an error like : Error CS8357 The specified version string contains wildcards, which are not compatible with determinism. Either remove wildcards from the version string, or disable determinism for this compilation Solution : Unload Project from visual studio and edit .csproj file Or open .csproj solution file in editor. Search for tag and Change value from true to false Save file and reload project again inside Visual studio <propertygroup> <configuration condition=" '$(Configuration)' == '' ">Debug</configuration> <platform condition=" '$(Platform)' == '' ">AnyCPU</platform> <projectguid>{76602FA1-9AD8-4014-BA5D-2E9128C19AB2}</projectguid> <targetframeworkversion>v4.7</targetframeworkversion> <filealignment>512</filealignment> <a...
It seems that there is no way to dynamically set the height and width of an external image used in rdlc report, but here a workaround to make it possible Add image to you Report On the image properties, set it to use External image source and use a report parameter to set which image to use On image, set "keep original size" Edit: You may also generate such "padding image" dynamically to allow different widths, for example: public void GenerateReport(int width, int height) { var image =Bitmap.FromFile("your image path"); //you can use stream or other way to get the image using (var g = Graphics.FromImage(image)) { g.Clear(Color.Transparent); g.FillRectangle(new SolidBrush(Color.Transparent), 0, 0, width, height); // here will change the size to fit in report } MemoryStream ms = new MemoryStream(); image.Save(ms, System.Drawing.Imaging.ImageFormat.Png); // and pa...
Comments
Post a Comment