Showing posts with label image. Show all posts
Showing posts with label image. Show all posts

Thursday, 21 May 2015

Image Croping Tool with JS and JQuery in VF page.

Hi Guys,


In this post i am going to show how we can crop an image and upload it in Documents Object of Salesforce.

I am taking a simple example and following the below mentioned steps:-
  • Create a VF page which has a upload image link.
  • on click of upload link i am opening a pop up of another VF page which is used to select image file from local system.
  • now after selecting file click on upload button.
  • after clicking on upload button magic is started now you can zoom-in, zoom-out or drag image and can easily select part of image you needed to upload in salesforce document.
  • Finally on click of save button image is inserted in document object and pop up window is closed.
Here the code:-

Screen Shoots:-
Upload Picture Page

On click of upload link opened popup page

choose picture from local system

selected picture get uploaded

Zoom Out picture

Zoom In Picture

Finally crop Picture

cropped picture saved


Hope this helps...happy Coding

Thanks
Anurag Jain

Monday, 6 January 2014

Genrate Bar Codes from UPC or SKU by REST API.







Hi friends,

By this post I’ll show how to save Bar Code in Salesforce by using UPC code,

I call web service of third party which gives the image of Barcode (by using REST Api’s) and that image is Saved in the Notes and Attachment of Product.

Here the Sample code for same:-

Screen Shots:-







Saturday, 30 November 2013

Showing image in the ms-word document from vf page of Salesforce.





Hi guys,


I am writing this because one of my friend get stuck in this requirement, I am also get surprised why the image is not showing in the MS-Document,

then finally I got its solution.

Here the code for the VF-Page,

   <apex:page sidebar="false"
            showHeader="false"
            contentType="application/msword#Test.doc"
            cache="true">

<head>
                        <meta http-equiv="Content-Type" 
                               content="text/html;charset=UTF-8" />
</head>

<img src="Document_URL" />
    </apex:page>

--> Document_Url is the url of the your image uploaded in the Document object of Salesforce.
--> cache = "true" for IE.

Hope  it helps...
Happy Coding...

Thanks,
Anurag Jain.