Showing posts from July, 2020

Convert Multiple images to a PDF file

This post shows a simple project which converts multiple images into a PDF document in Sketchware. 1. Create a new project in Sketchware. 2. In View area of main.xml , add Button button_open Button button_save EditText edittext1 ListView listview1 3. Create a Custom View itemview.xml . In this view add ImageView imageview1 4. For listview1 select itemview as CustomView. 5. Add a FilePicker fp for picking images ("image/*"). 6. Add a number variable n , and a String variable save_path , a String variable path1 , a List String  list , and List Map  imagelist . 7. In button_open onClick event use FilePicker pick files block. 8. In FilePicker onFilesPicked event, add selected paths to imagelist  using key 'pic', and display  imagelist in listview1 using blocks shown in image below. 9. In ListView onBindCustomView event, set image of imageview1 to file path from imagelist . 10. In button_save onClick event, create new PDF document, add images from imagelist