How to display indian currency properly in pdf in Magento 2.x

Download the font that support Indian Rupee symbol. please download dejavu-sans font. copy  DejaVuSans.ttf place the above font folder in lib/LinLibertineFont/ directory../vendor/magento/module-sales/Model/Order/Pdf/AbstractPdf.php./vendor/magento/module-sales/Model/Order/Pdf/Items/AbstractItems.php $font = \Zend_Pdf_Font::fontWithPath( // $this->_rootDirectory->getAbsolutePath(‘lib/internal/LinLibertineFont/LinLibertine_Re-4.4.1.ttf’) $this->_rootDirectory->getAbsolutePath(‘lib/internal/LinLibertineFont/DejaVuSans.ttf’) ); (in _setFontRegular(), _setFontBold(), _setFontItalic() functions in both files.)

Read more...
phptutorial

Simple Pagination with php-mysql

Simple pagination code for PHP developers. Step 1 :Create database name “pagination” in mysql using phpMyadmin.-- -- Table structure for table `exclusive_news` --CREATE TABLE `exclusive_news` ( `id` int(2) NOT NULL, `post_id` int(6) DEFAULT NULL, `date` varchar(25) CHARACTER SET latin1 NOT NULL, `title` longtext CHARACTER SET utf8 COLLATE utf8_general_mysql500_ci NOT NULL, `content` longtext NOT NULL, `media` varchar(500) CHARACTER SET latin1 NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf16; orStep 2 :import the sql file from db folder of project to database with...

Read more...

How to call webservice from kotlin in android

Step 1:create new application on Android Studio 3.0 Create GUI  textView, button and progress bar Add some external library create kotlin data class define your webservice url in MainActivity.kt add internet uses permission your mainfest.xml fileMainActivity.kt package com.iotwebplanet.learn.myapplication1import android.os.Bundle import android.support.design.widget.FloatingActionButton import android.support.design.widget.Snackbar import android.support.v7.app.AppCompatActivity import android.support.v7.widget.Toolbar import android.util.Base64 import android.view.Menu import android.view.MenuItem import android.view.View import android.widget.Button import android.widget.TextView import java.net.HttpURLConnection import java.net.URL import android.os.StrictMode import android.widget.ProgressBar import com.beust.klaxon.* import com.github.salomonbrys.kotson.fromJson import com.google.gson.Gsonclass MainActivity : AppCompatActivity() {public fun parse(name: String):Unit { val cls = Parser::class.java ...

Read more...