Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Delphi Programming Projects
Delphi Programming Projects

Delphi Programming Projects: Build a range of exciting projects by exploring cross-platform development and microservices

eBook
€17.99 €26.99
Paperback
€32.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
Table of content icon View table of contents Preview book icon Preview Book

Delphi Programming Projects

Building an Instagram Clone

The world has changed. We are in the new digital age where, every day, more and more apps are available to the users. So, what really grabs attention, since we have so many options available? Features, user experience, rich design? We can say that, with Delphi, we have all the ability to develop rich applications, both graphically and in terms of functionality.

A major challenge for Delphi developers is the paradigm shift between desktop and mobile platforms. The way to develop and draw a form is different, of course; however, many developers program as if they were still working with a Delphi 7 IDE.

If you are this type of developer and want to learn more about responsive design and how to change your desktop mindset for mobile, then this is an ideal chapter for you.

We have chosen an application already on the market—Instagram—to better elucidate these insights and this paradigm shift.

In this Delphi version of Instagram, you will be introduced to the following topics:

  • Mindset between desktop and mobile
  • Creating responsive layouts
  • Creating buttons with Scalable Vector Graphics (SVG) icons
  • Interacting with the camera
  • Sharing photos

The knowledge necessary for understanding this chapter is basic. Experience with Delphi is not necessary; minimal knowledge of the IDE and some components, such as buttons, edits, and list views, is sufficient.

Technical requirements

Project overview

The goal of this project is to enable you to better understand the use of visual components and the concept of responsive design, and introduce the concepts of actions and use them to take beautiful photos.

The estimated build time is two to five minutes.

Getting started

It is necessary to have access to the internet to access sites that offer SVG.

No download is required.

Mindset difference between desktop and mobile

When smartphones became essential and the emergence of the three major mobile OS competitors (iOS, Android, and Windows phone—this last one has been discontinued) took shape, developers were confused. After all, who was not accustomed to responsiveness or smaller screens? Before diving into this new world, you need to understand some important things.

Developing for the Windows desktop, we have some benefits—available memory, ease of interface design (usually in resolutions of at least 1,024 x 768), and others. Most of these features make the programmer's life much more focused on the logic of the application without worrying too much about available computer resources or the like.

When web applications began to emerge with their HTTP protocol in the best request-response style, a new concept of development was created. The programmer had to adapt to the new markup languages (HTML and CSS) and had to separate their application in what we call the server/client side. So, anyone who previously programmed into a single programming language (such as Java or C#) had to adapt to learn markup languages. And, with a need for insertion in the web world, the programmer needed to deal with screen sizes. On the other hand, the applications should be more and more responsive to work more in the varied sizes of screen, from tiny phones to tablets and desktops; not to mention the limitations of the hardware, since they have less processing power and memory than desktop computers.

Mobile has combined the advantages of the previous two along with their disadvantages. If it was said in the web application that everything was on the web, that is to say, for any user access just entering the site, the mobile brought back the desktop concept. The application is installed in the device, and, if you have to upgrade the application, you have to do so for each device. We return to the same situation as desktop applications.

Having limited hardware, including reduced screen size and the absence of peripherals means that the challenge for the mobile developer is more complex

Before you start reading into this topic, you must abandon certain preconceptions, such as the idea that developing for mobile is the same as doing so for web or desktop. No, it's not! Remember that your user is on a limited device and does not have any peripherals for assistance, such as a mouse or keyboard.

Follow these steps to learn about viewing for different screen types:

  1. Open the Delphi IDE and create a Multi-Device Application. Note that different screen types will have different viewing characteristics:
  1. Select one Android or iPhone view.
Note that the display format is changed. Try working on master view and switch views to keep track of the layout of your components on the form.

When you work with a different view of the master, Delphi will create a new .FMX file in your project folder. This file will contain the positions of the components for that particular screen format. The paradigm shift is not just about the size or the screen format, but the Delphi IDE helps us identify those nuances.

Range of sizes

There are a range of sizes used to determine the view that is used in Android apps. Note that the runtime does not require an exact match to select a view. The runtime chooses the closest match. The following table shows the ranges for each view, specified in landscape coordinates:

View Name

Minimum Size

(Pixels)

Maximum Size

(Pixels)

PPI
Android 3.5'' Phone 800x500 1,000x600 320
Android 4'' Phone 1,1168x730 1,360x850 320
Android 5'' Phone 1440x900 1,708x960 320
Android 7'' Tablet 1708x960 1,920x1,200 320
Android 10'' Tablet 2,400x1,500 2,560x1,600 320

It is possible to visualize the layout of the forms in the device in real time by looking at the Berlin version design time. Fantastic, isn't it? To do this, download the Fire UI Live Preview application from your platform store (Google Play: http://docwiki.embarcadero.com/RADStudio/Rio/en/FireUI_App_Preview, or Apple Store: https://itunes.apple.com/us/app/fireui-app-preview-10.1-berlin/id1090861997) or install directly via the C:\Program Files (x86)\Embarcadero\Studio\20.0\LivePreview\ path.

FireUI Live Preview is a server/client multi-device tool that allows you to broadcast the active form of your application, in real time, to several devices simultaneously.

Creating responsive layouts

In this topic, you will learn how to work with responsive layouts in Delphi using FireMonkey (FMX). For the examples, we will use Delphi Tokyo. Let's have a look at the required steps:

  1. To start, open Delphi and create a new project by navigating to File | New | Multi-Device Application-Delphi and select Blank Application:

Adjust the style for Android; for example, for the view, we will continue in the Master view.

Give preference to working in the Master view. During development, if you want to modify views and add new controls to your form, the responsiveness properties will not be inherited. For example, when adding a TButton component to a 4-inch Android view, properties will be lost if you create to modify for a different view, such as iPhone. In the Master view, all the characteristics will be kept, keeping their proportions clear, by the platform.
  1. Add a Toolbar component to your form.
  2. Create two buttons inside Toolbar.
  3. Select the two buttons and align to the left.
  4. Modify the margins to 5 on each property.
  5. Save your project and run the application for a Windows platform.
  6. Then, select the first button that is already configured and modify the StyleLookup property by selecting the cameratoolbutton option. Notice that the button icon is then changed to a specific camera icon.
  7. Add another Toolbar component, but leave it with bottom alignment. In this toolbar, add a button, align it to the right, and change its margins to 5, as in the top buttons. This button will exit the application.
  8. Finally, add a TLayout component to the center of your form so that it fills the empty area and align it when using Client.
  9. Also, modify StyleLookup for the missing buttons. For the button next to the camera, select searchtoolbutton, because, through this, we will search the already-saved images in the device. For the last button, select escapetoolbutton in the StyleLookup property, because, with this button, we will leave the application.

TLayout

The FireMonkey components have an owner, parent, and children. If you put any component on a form, it becomes the owner and parent of the component.

Using properties such as Position, Align, Margins, and Padding with anchors, you will turn your app in to a responsive application.

Note that, even if you resize the form, the buttons remain aligned to the left, respecting the margins, and are inside the toolbar.
FireMonkey layouts are containers for other graphics objects that can be used to build elegant-looking forms. FireMonkey layouts extend the functionality of the controls for the arrangement and scaling of controls.

To achieve rich interfaces using TLayout, use more than one layout and the organization properties of the child controls in the layouts.

If everything went well here, you will have a form as shown in the following screenshot:

Try creating new views and see the resulting alignment. This is the basic principle for developing a responsive application in FireMonkey.

If you want to view the format with the screen rotated, there is a button to rotate the screen. With this, you can view the layout on the screen in a different format as shown in the following screenshot:

Look at the different types of layouts and their characteristics. For project types where you need to insert many components, use the ScrollBox so you can have a scrolling effect on your form.

Creating buttons with SVG icons

In the previous project, we created the main basic layout. Later on, we created photo and sharing events. In this project, we will work with the use of SVG icons, which are infinitely smaller in size in relation to the allocation of space.

SVG is an XML-based vector graphics format that can scale to any size without losing clarity. SVG images and their characteristics are defined in XML text files. That is, they can be searched, indexed, scripted, and compressed. Like XML files, SVG images can be produced and modified with any editing software.

We will use 100% native components in order to use an SVG image. To do this, follow this step by step:

  1. From the Tool Pallet, select TRectangle. Add in the toolbar created previously, use the property, and align the rectangle by setting it to the center. You will now have a rectangle centered in the toolbar.
  2. Add a speed button inside this same rectangle. Note that in the Structure pane, the button is contained within the shape. Do the same with the TPath component, but leave it as the child of the speed button. Align both to Center.
  3. Clear the Text property of the new speed button:

The structure of your application should be like this, with the components nested.

  1. Okay, now that you have the basic structure assembled on your form, it's time to choose an SVG icon to illustrate this button. The purpose of this button is to execute the share function when clicked. So, we can now share a photo. You can search the internet for various SVG icons. In this example, you can copy the SVG code at http://materialdesignicons.com/ to use in our application.

  1. The icon used is Instagram. It is important to note that in certain tools or websites, such as materialdesignicons.com, you have the functionality to view the SVG code and also to be able to download the binary file. A simpler way to get the SVG code is to view it online:

In this case, to copy the correct information from the SVG vector, go directly to the d= property and copy its content. This property contains the icon code:

  1. Once you have the content of the SVG vector, you can include it in your Delphi application using the TPath component. To do so, follow these steps:
    1. Select the TPath component.
    2. Select the Data property.
    3. Input the SVG content and save as shown in the following screenshot:
Note that by entering the content of the data tag in the TPath component, you can preview the image.

This is what the Instagram icon looks like:

You can color the icon in the Fill property, including Gradient. To remove the border, just leave it as None in the Stroke.Kind property at Object Inspector:

You can also change the color of your button as long as it is inside the rectangle. To do this, change the Fill.Color property of the rectangle and watch the magic happen.

In the first two steps, we created a new button and centered the toolbar. Notice that this button has a new component, the TPath. The TPath is inside our button. This causes the image, which we copy from the internet appears contained in the component. In steps three, four, and six, we located the SVG icon and copied its content through the d property. With the contents of the image copied, we then go to the TPath component, making it display the same icon that was selected, in this case, Instagram.

If you're not familiar with SVG icons, feel free to browse through a variety of other sources. There are numerous websites for downloading icons in various formats, including SVG.

Interacting with the camera

There are at least two ways to take a picture with FireMonkey—the first, for the lazy, is to use an ActionList, linking the action of taking a photo to a visual component, such as a button. In this case, your application will request access to the device's camera application.

The second form, however, gives us more freedom in terms of functionality, using TCameraComponent. With it, you can set the resolution, specify the type of camera (front or back) that can be used, choose to use the flash, and you can even create your own flashlight application.

Lights, camera, and action!

Now that we have the main screen properly built with its main components anchored, we can work on the main functionality—recording moments! Using the same project as the previous recipes, we will finally develop the code to capture images:

  1. First, add a TImage component to your form and set its alignment to alClient, filling all layout content. We will use this TImage to display the photo. Now, do the same for a non-visual component, called ActionList. Enter this into the form. Change the TImage property and name it as ImgInsta.
  2. With the right-click on ActionList, open the ActionList Editor option.
    With the keyboard, click Ctrl + Insert to open the dialog containing the options; you can also go with the mouse on the New button and insert the new action. The action we want is TTakePhotoFromCameraAction:

In this project, we will capture the image in two ways, the first with a standard action and the other using the IFMXCameraService interface.

  1. Let's create the DoDidFinish procedure:
procedure TForm1.DoDidFinish(Image: TBitmap); begin ImgInsta.Bitmap.Assign(Image); end;
  1. In this procedure, the image parameter, which will come from the camera, will be assigned to the TImage component in our form. Remember to assign this procedure to the OnDidFinishTaking event of TTakePhotoFromCameraAction:
procedure TForm1.TakePhotoFromCameraAction1DidFinishTaking(Image: TBitmap);
begin
DoDidFinish(Image);
end;

In the next few steps, you will understand why this is redundant.

  1. We can create a new default action, which will fetch images already saved in the device library. Repeat the process to add a new action to your ActionList; however, this time select the TTakeFromLibrary action.
If you want your application to automatically save the pictures taken by a device camera to the device photo library, set the TCustomTakePhotoAction.NeedSaveToAlbum property to True.
  1. When selecting the event of this new action, the code is exactly the same code that was made in TTakePhotoFromCameraAction:
procedure TForm1.TakePhotoFromLibraryAction1DidFinishTaking(Image: TBitmap);
begin
DoDidFinish(Image);
end;
Note that since the image comes from a parameter, which comes from the action, it allows you to use exactly the same line of code.
  1. Bind the respective actions to their execution buttons:
  1. Let's increase the project a bit more, including an extra button added to the top in the first toolbar, only this time, right-aligned. This button will also take a picture, but, using the IFMXCameraService interface. To perform such an act, include the following units in the uses clause of your form:
uses
  FMX.MediaLibrary, FMX.Platform, System.Messaging;

  1. Add another procedure to capture the message coming from the device and thus identify an action to take photos:
procedure DoMessageListener(const Sender: TObject; const M: TMessage);

Its implementation is shown in the following code snippet:

procedure TForm1.DoMessageListener(const Sender: TObject; const M: TMessage);
begin
if M is TMessageDidFinishTakingImageFromLibrary then
ImgInsta.Bitmap.Assign(TMessageDidFinishTakingImageFromLibrary(M).Value);
end;
  1. Encode the FormCreate procedure:
procedure TForm1.FormCreate(Sender: TObject);
begin
TMessageManager.DefaultManager.SubscribeToMessage(
TMessageDidFinishTakingImageFromLibrary, DoMessageListener);
end;
  1. To conclude, let's encode the onClick event of the newly added button:
procedure TForm1.Button3Click(Sender: TObject);
var
Service: IFMXCameraService;
Params: TParamsPhotoQuery;
begin
if TPlatformServices.Current.SupportsPlatformService(IFMXCameraService,
Service) then
begin
Params.Editable := True;
// Specifies whether to save a picture to device Photo Library
Params.NeedSaveToAlbum := True;
Params.RequiredResolution := TSize.Create(640, 640);
Params.OnDidFinishTaking := DoDidFinish;
Service.TakePhoto(Button3, Params);
end
else
ShowMessage('This device does not support the camera service');
end;

We divide this project into two parts, where, in the first part, we use an ActionList to take a picture. These actions require very little programming; however, they will not work on Windows platforms. In the second part, when using the IFMXCameraService interface, we have the freedom to implement our codes with a few more lines but greater freedom. We can also include parameters that allow us to, for example, set the minimum resolution and define whether we will save the image to the device as well.

You should also check the TCameraComponent component. You can take your photos without even directing them to your device's camera, including video recordings.

Sharing photos

FireMonkey's basic sharing service does not differ from the way we interact to take a photo; that is, we can use a standard action in our ActionList1 to create a new event where we share the photo you just took.

Now that our application is responsive and is properly recording the most important moments through photographs, let's share! Using the same example from previous recipes, we will now develop the button event we created with the SVG icon.

The following steps will show you how to share the photos using FireMonkey:

  1. Create a new action in the ActionList1, in the Media Library category, to display the share center. Select the ShowShareSheetAction1 action:
  1. The event is now different; in order to share, it is necessary to assign what you want to share. In our project, we will share a photo. For this, we must program the OnBeforeExecute event of this action:

The following is the code for the OnBeforeExecute event:

procedure TForm1.ShowShareSheetAction1BeforeExecute(Sender: TObject);
begin
ShowShareSheetAction1.Bitmap.Assign(ImgInsta.Bitmap);
end;
  1. Now, to finish, just assign the newly coded action the Action property of our button. You can use Structure pane and select the TSpeedButton (which has the TPath component is inside it) component with the Instagram logo. With everything ready, when taking a photo it will be filled through the TImage component that can be shared.

The following screenshot shows the form view at development time:

The following screenshot shows the form view running on an Android mobile:

Finally, the application images are still at design time in Delphi and are already running on an Android device.

Summary

We have introduced through this mini Instagram clone how to work with basic responsive design, making sure that, regardless of the size of the screen, our controls adjust according to the screen. Then, through the TPath component, we included icons in SVG format, drastically reducing the size of the images and icons thanks to vectorization.

Our code was simple and consisted of only three lines. At a minimum, we can take a photo, choose a photo from the library, and share with friends. All this is done using ActionList and interfaces already done in the FireMonkey library.

In the next chapter, you'll be introduced to the wonderful world of APIs. Not only is it possible to consume Facebook API services, but you can develop your application on the platform by interacting with Delphi.

Delphi is this simple, RAD, and practical!

Further reading

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Build responsive user interfaces (UIs) for desktop and mobile with FireMonkey
  • Implement a microservices architecture using the Rapid Application Development(RAD) server
  • Create clones of popular applications like Instagram and Facebook using Delphi 10.3

Description

Delphi is a cross-platform programming language and software development kit that supports rapid application development for Microsoft Windows, Apple Mac OS X, Android, and iOS. With the help of seven practical projects, this book will guide you through the best practices, Delphi Run-Time Library (RTL) resources, and design patterns. Whether you use the Visual Component Library (VCL) or FireMonkey (FMX) framework, these design patterns will be implemented in the same way in Delphi, using Object Pascal. In the first few chapters, you will explore advanced features that will help you build rich applications using the same code base for both mobile and desktop projects. In addition to this, you’ll learn how to implement microservice architecture in Delphi. As you get familiar with the various aspects of Delphi, you will no longer need to maintain source code for similar projects, program business rules on screens, or fill your forms with data access components. By the end of this book, you will have gained an understanding of the principles of clean code and become proficient in building robust and scalable applications in Delphi.

Who is this book for?

This book is for developers, programmers, and IT professionals who want to learn the best market practices by implementing practical projects. Prior knowledge of the Delphi language is a must.

What you will learn

  • Get to grips with the advanced features of RTL
  • Understand how to deal with the paradigm change between multiplatform projects
  • Build rich interfaces with Google s Material Design features
  • Understand how to implement design patterns in Delphi
  • Turn a mobile device into a remote controller with app tethering technology
  • Build a multi-database system using VCL
Estimated delivery fee Deliver to Malta

Premium delivery 7 - 10 business days

€32.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : May 03, 2019
Length: 248 pages
Edition : 1st
Language : English
ISBN-13 : 9781789130553
Category :
Languages :
Tools :

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
Estimated delivery fee Deliver to Malta

Premium delivery 7 - 10 business days

€32.95
(Includes tracking information)

Product Details

Publication date : May 03, 2019
Length: 248 pages
Edition : 1st
Language : English
ISBN-13 : 9781789130553
Category :
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 111.97
Delphi Cookbook
€41.99
Delphi Programming Projects
€32.99
Hands-On Design Patterns with Delphi
€36.99
Total 111.97 Stars icon

Table of Contents

8 Chapters
Building an Instagram Clone Chevron down icon Chevron up icon
Building a Facebook REST API Chevron down icon Chevron up icon
Cross-Platform Services for Windows, iOS, and Android Chevron down icon Chevron up icon
Design Patterns to Build a Multi-Database System Chevron down icon Chevron up icon
Creating GUI Apps with FireMonkey Chevron down icon Chevron up icon
Implementing Tethering to Create a Remote Control Chevron down icon Chevron up icon
Building Microservices Using the RAD Server Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.2
(9 Ratings)
5 star 55.6%
4 star 22.2%
3 star 11.1%
2 star 11.1%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




Anônimo Dec 13, 2019
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Recomendo os capítulos do RAD Server e de material design especialmente. O livro é uma jóia.
Amazon Verified review Amazon
Nivaldo de Amorim Assis Jul 24, 2023
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Ótimo livro.
Amazon Verified review Amazon
Seeker Nov 15, 2019
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I have a requirement for a Rad Server project from a client and I read up all the information on Embarcadero web sites and looked at a few videos, even got their official PDF that describes it. But there were several issues not explained properly. Luckily I discovered this book and bought from Packt directly as ebook. Went straight to the chapter on Micro services with Rad Server and found all the information with neat screenshots explaining all the steps right till the deployment stage. Very nice! It takes effort to compile such complex information in logical steps that are easy to understand.
Amazon Verified review Amazon
Fabio Cardoso Chagas Jun 10, 2021
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Conciso, e excelente fluxo de aprendizado. Os tópicos associados facilitam o entendimento. Ótimo para consultas rápidas de técnicas atuais que melhoram a aplicação.
Amazon Verified review Amazon
Mauricio Abreu Jul 09, 2019
Full star icon Full star icon Full star icon Full star icon Full star icon 5
O produto é exatamente o que eu precisava e tem a qualidade muito boa.A entrega da Amazon foi incrível chegou antes da data estimada.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela