You are on page 1of 24

VISVESVARAYA TECHNOLOGICAL UNIVERSITY

BELAGAVI – 590018

PROJECT REPORT ON

“CONVERT WEBVIEW TO PDF APP”


BACHELOR OF ENGINEERING
IN

INFORMATION SCIENCE & ENGINEERING

MOBILE APPLICATION DEVELOPMENT [18CSMP68]


Submitted by

PREKSHA S NAIK – 4JK20IS037


MONISHA– 4JK20IS031

Under the guidance of

Prof Navya S Rai Prof Rakesh M R


Assistant Professor Assistant Professor
Department of Information Science & Department of Information Science &
Engineering Engineering

DEPARTMENT OF INFORMATION SCIENCE & ENGINEERING


A.J. INSTITUTE OF ENGINEERING & TECHNOLOGY
NH-66, KOTTARA CHOWKI, MANGALURU – 575006
2022 – 2023
A. J. INSTITUTE OF ENGINNERING & TECHNOLOGY
NH – 66, Kottara Chowki, Mangaluru - 575006
A Unit of Laxmi Memorial Education Trust (R)
(Affiliated to Visvesvaraya Technological University, Belagavi & Approved by AICTE, New Delhi)
DEPARTMENT OF INFORMATION SCIENCE AND ENGINEERING

CERTIFICATE
Certify that the Project entitled “CONVERT WEBVIEW TO PDF APP” is carried out by
Ms. PREKSHA S NAIK, USN: 4JK20IS037, and Ms. MONISHA, USN:
4JK20IS031, Students of sixth semester B.E. Information Science & Engineering, and
submitted as a part of the course MOBILE APPLICATION DEVELOPMENT
[18CSMP68] during the academic year 2022-2023.
It is certified that all corrections/suggestions indicated for Internal Assessment have been
incorporated in the Report deposited in the departmental library. The report has been approved
as it satisfies the academic requirements in respect of Mobile Application Development Project
prescribed for the said Degree.

Prof Navya S Rai Prof Rakesh M R Dr Suresha D


Project Guide Project Guide Head of the Department

Examiners Signature with Date

1.
2.
ACKNOWLEDGEMENT

First and foremost, we thank our parents for what we are and where we are today, without
whose hard work and sacrifice we would not be here today.

We deem it a privilege to place on record the deep sense of gratitude to our Project Guide Prof.
Navya S Rai, Assistant Professor, Department of Information Science and Engineering, and Prof.
Rakesh M R, Assistant Professor, Department of Information Science and Engineering, who
always stood behind us and supported in each step of the project work.

We are grateful to Dr. Suresha D., Head of the Department, Information Science and
Engineering for his support and encouragement.

We are indebted to our respected Principal Dr. Shantharama Rai. C, beloved Vice President
Mr. Prashanth Shetty and the management of A. J. Institute of Engineering and
Technology, Mangaluru for providing all the facilities that helped us in timely completion of
this project report.

Finally, we would like to thank all the teaching and non-teaching staff of Department of
Information Science and Engineering for their valuable help and support.

Preksha S Naik 4JK20IS037


Monisha 4JK20IS031

i
ABSTRACT

This abstract presents a Mobile Application Development (MAD) project focused ondeveloping a
mobile application that allows users to convert web views into PDF documents seamlessly. The
project aims to design and implement a user-friendly mobile application using cross-platform
frameworks such as React Native or Flutter.The application will leverage web scraping techniques
to capture web views accurately, while rendering mechanisms will ensure the correct display of
web content within the app's interface. A robust PDF generation library or API will be integrated
to convert the captured web views into high-quality PDF documents, maintaining original layout,
formatting, and visual elements. The user interface will prioritize simplicity, offering options to
enter URLs or select frequently visited websites, along with customization options for PDF layout
and settings. The application will also feature a file management system for organizing and
storing converted PDF files, with capabilities for previewing, renaming, deleting, and sharingPDFs.
Thorough testing and debugging will ensure stability, performance, andcompatibility with various
web content sources and mobile devices. The successful completion of this project will provide
users with a convenient and efficient methodto convert web views into PDF documents on their
mobile devices, benefiting professionals, researchers, students, and anyone needing to capture and
save web content for offline use or archival purposes.

ii
TABLE OF CONTENT
Chapter No Contents Page No

Acknowledgement i
Abstract ii
Table of content iii
List of figures iv

1 INTRODUCTION 6-9
1.1 About the project 6
1.2 Objectives of the project 6
1.3 Scope of the project 8
1.4 Problem statements 8
1.5 Goals 8
1.6 Benefits of the project 9
2 REQUIREMENT SPECIFICATION 10-11
2.1 Software requirements 10
2.2 Hardware requirements 10
2.3 Functional requirements 10
3 SYSTEM DESIGN 12
3.1 User Interface (UI) 12
4 IMPLEMENTION 13-14
4.1 About Android 13
4.2 Android Architecture 13
4.3 Android Run Time 13
4.4 Linux Kernel 13
4.5 Details of the Language 14
4.6 Java Environment 14
4.7 Java Media Framework 14
4.8 Libraries 14
5 RESULTS 15-21
6 CONCLUSION AND FUTURE WORKS 22
6.1 Conclusion 22
6.2 Future works 22
REFERENCE
iii
LIST OF FIGURES

Figure No. Figure Name Page No.

Figure 3.1 Architectural Diagram of the Application 12

Figure 5.1.1 Home page 15

Figure 5.1.2 Search web page 16

Figure 5.2.1 Printer Selection 17

Figure 5.2.2 Printer Selected 18

Figure 5.3.1 PDF preview 19

Figure 5.3.2 Save as PDF 20

Figure 5.3.3 PDF downloaded 21

iv
CONVERT WEBVIEW TO PDF

CHAPTER 1
INTRODUCTION

Requirements are during early stages of a system development as a specification of what should be
implemented or as a constraint of some kind of on the system. They may be a user level facility
description, a detailed specification of expected system behavior, a general system property, a specific
constraint on the system, and information on how to carry out some computation or a constraint on the
development of the system. The end product of the requirement analysis phase is a requirement
specification. The requirement specification is a reconstruction of the result of this analysis phase.
Natural language is often used to write system requirements specifications. Further problems with
natural languagecan arise when it is used for more detailed specification:
 Natural language understanding relies on the specification of the readers and writers using the
same wordsfor the same concept. This leads to misunderstandings because of the ambiguity of
the natural language.
 A natural language requirements specification is over-flexible. You can say the same thing in
completely different ways. It is up to the reader to find out when requirements are same and
when they are distinct

1.1About the project

The Web view convert to PDF app mode for android .Using android studio it is a project to showcase
my knowledge and practical skill in android development with java .The application was developed
using MVC approach .Using proper programming conventions including documentation,
error/exception handling, through program structure and memory efficiency. The app starts the
webpage .The user can search their webpage in Google and they can review the webpage and the user
can convert the web view into PDF and the user can viewthe convert PDF in downloads folder and the
user can take a use of it.

1.2Objectives of the project

The project objectives of a web view to PDF converter app can vary depending on the specific
requirements and goals of the project. However, here are some common objectives that you may
consider:
Web Page Capture: Develop a functionality to capture web pages and display them within the app's
WebView component. This involves rendering HTML, CSS, JavaScript, and any embedded content
accurately.

Dept. of Information Science and Engineering, AJIET, Mangaluru. 6


CONVERT WEBVIEW TO PDF

PDF Generation: Implement a mechanism to convert the captured web page into a PDF document.
Ensure that the conversion process retains the layout, formatting, images, and other media elements
present on webpage.
User Interface: Design an intuitive and user-friendly interface for the app, allowing users to easily
navigate, input URLs, and perform conversions. Consider providing options for customizing the output
PDF, such as pagesize, orientation, and header/footer inclusion.
PDF Rendering: Incorporate a PDF viewer component that enables users to preview the generated
PDF withinthe app. This viewer should support features like zooming, scrolling, and page navigation.
Offline Conversion: Enable users to convert web pages to PDF even when they are offline. Implement
a caching mechanism to store web page data temporarily, allowing conversions to be performed
without an active internetconnection.
Performance Optimization: Optimize the app's performance by implementing efficient algorithms
and techniques for web page capture, PDF generation, and rendering. Aim for fast and seamless
conversions to enhance the user experience.
Cross-platform Compatibility: Develop the app to work on multiple platforms, such as Android, iOS,
and web browsers. Utilize appropriate frameworks or technologies to achieve cross-platform
compatibility.
Error Handling: Implement robust error handling mechanisms to handle scenarios such as network
failures, invalid URLs, unsupported web content, and other potential issues. Provide informative error
messages to guideusers in troubleshooting problems.
Security and Privacy: Prioritize the security and privacy of user data during web page capture and
PDF conversion. Ensure that the app handles sensitive information appropriately and follows best
practices for data protection.
Testing and Quality Assurance: Perform comprehensive testing to identify and resolve any bugs,
glitches, or compatibility issues. Conduct user testing to gather feedback and improve the app's
usability and performance.

Dept. of Information Science and Engineering, AJIET, Mangaluru. 7


CONVERT WEBVIEW TO PDF

1.3 Scope of the project


The scope of the MAD lab project is to create an app that can convert a webview into a PDF file. A
webview is a part of an Android app that displays web content within the app itself. This app will
allow users to convert any webpage they are currently viewing in the webview into a PDF file, which
they can then save or share.Toachieve this, the app will need to capture the current state of the
webview and convert it into a PDF file. This can be done using various libraries and APIs
available for Android development. One such is iTextPDF, which provides a simple way to create PDF
files programmatically in Java. The app will also need to provide users with options to customize the
PDF output, such as selecting the page orientation, paper size, and margins. Additionally, the app
should be able to handle different types of web content, including images,videos, and interactive
elements.

1.4 Problem statement


The problem statement of the MAD lab project is to develop an app that can convert a webview into a
PDF document. A webview is essentially a component in Android that displays web pages within an
app. The app would allow users to convert any webpage displayed in the app's webview into a PDF
document that can be savedand shared.To achieve this, the app would need to capture the content of
the webview and convert it into a PDF format. This can be done using various libraries and APIs
available for Android development. One such library is the Android PDF Writer library, which
provides a simple API for creating PDF documents from scratch or converting HTML pages to PDF
it's important to note that converting complex web pages with dynamic content, such as videos or
animations, can be challenging and may require additional coding and optimization.Developingan app
that can convert a webview into a PDF document requires knowledge of Android development and
familiarity with libraries and APIs for PDF conversion. It also requires careful consideration of the
limitations andchallenges involved in converting complex web pages.
1.5 Goals

The goal of the "Convert WebView into PDF" app project is to develop a mobile application that
allows users to convert web pages displayed in a WebView into PDF documents. The app should have
a user- friendly interface, enable offline support, provide customization options for PDF conversion,
handle error scenarios gracefully, prioritize security and privacy, ensure compatibility across devices,
and undergo thorough testing before deployment to app stores. The project aims to develop a user-
friendly interface thatintegrates a WebView component, allowing seamless browsing and interaction
with web content. The app should offer efficient PDF conversion functionality, including capturing
text, images, and formatting.

Dept. of Information Science and Engineering, AJIET, Mangaluru. 8


CONVERT WEBVIEW TO PDF

1.6 Benefits of the project

The Convert WebView into PDF app simplifies the process of capturing and converting web content
into PDFs,providing convenience, customization options, offline access, enhanced file management,
and improvedsecurity.. These benefits can be summarized as follows:
1.6.1 Convenient PDF Conversion: The app provides a simple and efficient way for users to
convert web pagesinto PDF documents directly from their mobile devices. It eliminates
the need for manual copying and pasting of content or using complex third-party tools.
1.6.2 Enhanced Accessibility: Users can access and convert web content into PDFs without
leaving the app. This improves accessibility and convenience, allowing users to save and
view important web information offlineor share it with others easily.
1.6.3 Time and Effort Saving: The app automates the process of capturing and converting web
pages into PDFs. Users can quickly generate PDF documents without manually
formatting or arranging content, saving significant time and effort.
1.6.4 Customization Options: The app offers customization features, such as selecting specific
sections of a webpage for conversion, adjusting page layout, and adding headers/footers.
This allows users to tailor the PDFsto their specific needs.
1.6.5 Offline Access: The ability to convert web pages into PDFs enables users to access and
view content offline, even without an internet connection. This is especially useful for
referencing important informationwhile traveling or in areas with limited connectivity.
1.6.6 Improved File Management: The app provides a file management system that allows
users to organize, rename, delete, and manage their converted PDF files within the app.
This ensures better organization andeasy retrieval of documents.

Dept. of Information Science and Engineering, AJIET, Mangaluru. 9


CONVERT WEBVIEW TO PDF

CHAPTER 2

REQUIREMENT SPECIFICATION

To develop an Android app, you need a set of software and the hardware requirements. Here are
the basicsoftware requirements for developing Android apps:

2.1 Software requirements

The software used for the development of the project is:

• Operation system : Windows, Android Studio

• Programming Language : Java, XML

• RAM:8GB

• Tools used : Android SDK tools, Android platform tools

• Emulators : AVD

2.2 Hardware requirements

The hardware used for the development of the project is:

• Processor : Intel i3 or above

• RAM : 4GB minimum/8GB recommended

2.3 Functional requirements


 User Authentication: Allow users to register and log in to the app.store user credentials and
session information.
 WebView Integration: Provide a webview component to load and display web
pages.Support basic web navigation functionalities such as page loading, reloading, going
forward, and going backward. Handle common webview events like page loading progress,
error handling, and SSL certificate validation.
 PDF Generation: Convert the loaded web page into a PDF document.Preserve the layout,
formatting, and images from the web page in the generated PDF.Include options to
customize the PDF output, such as page size, orientation, margins, and header/footer.
 User Interaction: Allow users to interact with the web page inside the webview (e.g.,
clicking links, filling forms).Provide controls for zooming in/out and scrolling the web
page.Support pinch-to-zoom gesture for touch-enabled devices.

Dept. of Information Science and Engineering, AJIET, Mangaluru. 10


CONVERT WEBVIEW TO PDF

2.1.1 PDF Saving and Sharing:Enable users to save the generated PDF locally on their
device.Provide options for users to share the PDF via email, messaging apps.Include an option to
print the PDF directly from the app.
2.1.2 File Management:Implement a file management system to organize saved PDFs.Allow users
to rename, delete, and organize PDF files into folders.Provide search functionality to quickly find
specific PDF files.
2.1.3 Settings and Preferences:Offer settings to customize app behavior, such as default PDF
output settings.Allow users to choose the storage location for saved PDFs.Provide options to
configure default file names, compression settings, and other PDF generation parameters.
2.1.4 Offline Support:Cache web pages for offline access if the user has previously loaded
them.Display a suitable message or error page when there is no internet connection.
2.1.5 Error Handling and Logging:Handle exceptions gracefully and display informative error
messages to users.
2.1.6 Platform Compatibility:Develop the app for multiple platforms (e.g., Android, iOS, web)
based on project requirements.Ensure the app follows platform-specific design guidelines and
performs optimally on each platform.
2.1.7 Security:Implement appropriate security measures to protect user data and prevent
unauthorized access.Securely handle user credentials and sensitive information during authentication
and PDF generation.
2.1.8 Performance Optimization:Optimize the app's performance by minimizing resource usage
and maximizing responsiveness.Implement techniques such as lazy loading, caching, and
background processing to improve user experience.

Dept. of Information Science and Engineering, AJIET, Mangaluru. 11


CONVERT WEBVIEW TO PDF

CHAPTER 3
SYSTEM DESIGN
The design of the Convert WebView to PDF app seamlessly converts web pages displayed in a
WebViewcomponent into PDF documents, simplifying the process of saving, sharing, and printing
web content.

3.1 User Interface (UI):


The user interface of the webview to PDF conversion app for the Mad lab project is clean and intuitive.
It features a URL input field for webpage selection, a "Convert" button to initiate the conversion
process, and PDF output display for preview or download. The simple design ensures a seamless
experience for users.

3.1 Architectural Diagram of the Application

Dept. of Information Science and Engineering, AJIET, Mangaluru.


12
CONVERT WEBVIEW TO PDF
CHAPTER 4

IMPLEMENTATION
Implementation is defined as specific set of activities designed to put into practice an activity or
program of known dimensions. Implementation processes are purposeful and are described
insufficient details such that independent can detect the presence and strengths of the "specific set of
activities" related to implementation.

4.1 About Android

Android is a mobile operating system based on a modified version of the Linux kernel and other
open source software, designed primarily for touchscreen mobile devices such as smartphones
tablets Android is developedby a consortium of developers known as the Open Hand Alliance and
commercially sponsored by Google. It was unveiled in November 2007, with the si commercial
Android device, the HTC Dream, being launched in September 200 Most versions of Android are
proprietary. The core components are taken from the Android Open Source Project (AOSP), which
is free and open-source software (FOSS) primarily licensed under the Apache License.

4.2 Android Architecture

Android is architected in the form of a software stack comprising applications, an OS, run-time
environment, middleware, services and libraries. Each layer of the stack, and the corresponding
elements within each layer, are tightly integrated and carefully tuned to provide the optimal
application development and execution environment for mobile device. The Android software stack
is a Linux kernel and a collection of C/C++ librariesexposed through an application framework that
provides services for, and management of, the runtime and applications.

4.3 Android Run Time


Android runtime (ART) is the managed runtime used by applications and some system services on
Android. ART and its predecessor Dalvik were originally created specifically for the Android
project. ART as the runtime executes the Dalvik Executable format and Dex bytecode
specification. ART and Dalvik are compatible runtimes running Dex bytecode, so apps developed
for Dalvik should work when running with ART. However, some techniques that work on Dalvik
do not work on ART.
4.4 Linux Kernel
Linux Kernel is heart of the android architecture. It manages all the available drivers such as
display drivers, camera drivers, Bluetooth drivers, audio drivers, memory drivers runtime.

Dept. of Information Science and Engineering, AJIET, Mangaluru.


13
CONVERT WEBVIEW TO PDF

4.5 Details of the Language


The term programming languages usually refers to the high-level languages. Each programming
languages has a unique set of keywords and special syntax for organizing program instructions.
Programming languages is a set of commands, instructions and other syntax use to create software
programs. Our project is implemented using Java programming language.

4.6 Java Environment

Java environment includes a large number of development tools and hundreds of classes and
methods. The development tools are part of the system known as Java Development Kit (JDK) and
the classes and methods are part of the Java Standard Library (JSL).also known as Application
Programming Interface (API).’

4.7 Java Media Framework

The Java Media Framework (JMF) is a recent API for Java dealing with real-time multimedia
presentation and effects processing. JMF handles time-based media, media which changes with
respect to time. Examples of thisare video from a television source, audio from a raw- audio format
file and animations. The beta JMF 2.0 specification will be used for this report, as they currently
reflect the features that will appear in the final version.

4.8 Libraries

Runs on top of the kernel Includes the following:

4.8.1 C / C++ core libraries like Lick and SSL (for encrypted communication between clients
and servers).

4.8.2 A media library for playback of audio and video media.

4.8.3 A surface manager to provide display management.

4.8.4 Graphics libraries that include SDL and OpenGL for 2D and 3D graphics.

4.8.5 SQLite for native database support.

4.8.6 SSL and Web Kit for integrated web browser and Internet security.

Dept. of Information Science and Engineering, AJIET, Mangaluru.


14
CONVERT WEBVIEW TO PDF

CHAPTER 5

RESULTS

Figure 5.1.1 : Home page

This above figure is the home page of web view when the user is logged in to the page. It is the common
webpage that is viewed when the google engine is searched.

Dept. of Information Science and Engineering, AJIET, Mangaluru.


15
CONVERT WEBVIEW TO PDF

Figure 5.1.2: Search webpage

This figure shows us that any webpage can be viewed. We are able to search about any information in this
webpage.

Dept. of Information Science and Engineering, AJIET, Mangaluru.


16
CONVERT WEBVIEW TO PDF

Figure 5.2.1: Printer selection

This figure shows us to select the printers that are available at the moment for printing.

Dept. of Information Science and Engineering, AJIET, Mangaluru.


17
CONVERT WEBVIEW TO PDF

Figure 5.2.2: Printer selected

This figure shows that a particular printer of the users choice is selected and the web information is ready to
be converted.

Dept. of Information Science and Engineering, AJIET, Mangaluru.


18
CONVERT WEBVIEW TO PDF

Figure 5.3.1:PDF preview

This figure shows us the pdf can be viewed in the by the user and the user can checked.

Dept. of Information Science and Engineering, AJIET, Mangaluru.


19
CONVERT WEBVIEW TO PDF

Figure 5.3.2: Save as PDF

This figure shows the step where the pdf is saved by the user.

Dept. of Information Science and Engineering, AJIET, Mangaluru.


20
CONVERT WEBVIEW TO PDF

Figure 5.3.3: PDF downloaded

This figure shows us where we can download the pdf which is converted.

Dept. of Information Science and Engineering, AJIET, Mangaluru.


21
CONVERT WEBVIEW TO PDF

CHAPTER 6

CONCLUSION

6.1 Conclusion

Web view converter to PDF is a app that helps students in saving the web view into PDF. The app is
a self dependent activity that can engage user in saving PDF, development of visualizing ideas.
Android as a full, open and free mobile device platform, with its powerful function and good user
experience rapidly developed into the most popular mobile operating system. This report gives an
overview of the different challenges and issues facedin android app development. The experience of
developing an android app is quite challenging, motivating as well as satisfying.

6.2 Future scope

The future scope of the Convert Webview To PDF App project includes the following points:

 Implement features to select specific webpage sections, customize PDF layout/formatting,


and preserve interactive elements like hyperlinks and form fields.

 Integrate with cloud services (e.g., Google Drive, Dropbox) to allow users to save converted
PDF files directly to the cloud for easy storage, sharing, and access.

 Enable users to convert multiple webpages to PDF in a batch process and implement a queue
managementsystem to handle simultaneous conversion requests efficiently.

 Introduce user accounts to save preferences, such as default PDF settings or favorite websites
for conversion, providing a personalized experience.

 Implement OCR technology to extract text from images or scanned documents within
webpages, makingimage-based content searchable and selectable in the PDF output.

 Develop versions of the app for various platforms (Android, iOS, desktop) to extend
availability and caterto users' preferred devices.

 Create browser extensions or add-ons to integrate the webview to PDF conversion


functionality directlyinto popular web browsers, simplifying the conversion process.

 Continuously optimize conversion algorithms, reduce resource usage, and minimize


processing time to enhance the app's performance, even with larger or complex webpages.

Dept. of Information Science and Engineering, AJIET, Mangaluru.


22
CONVERT WEBVIEW TO PDF

Dept. of Information Science and Engineering, AJIET, Mangaluru.


23

You might also like