Skip to content

Commit

Permalink
869450_sample : add the code sample.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sri-hari-haran-g committed Feb 9, 2024
1 parent f221285 commit 74edc09
Show file tree
Hide file tree
Showing 39 changed files with 943 additions and 828 deletions.
34 changes: 9 additions & 25 deletions Getting Started/MAUI/CreatePdfDemoSample/CreatePdfDemoSample.sln
Original file line number Diff line number Diff line change
@@ -1,43 +1,27 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31611.283
VisualStudioVersion = 17.8.34330.188
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CreatePdfDemoSample", "CreatePdfDemoSample\CreatePdfDemoSample.csproj", "{B82C7BB1-A62A-47A5-A4F8-711DFB765907}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CreatePdfDemoSample", "CreatePdfDemoSample\CreatePdfDemoSample.csproj", "{C710FE8F-6EA8-4610-85BA-2E857B2B1A58}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B82C7BB1-A62A-47A5-A4F8-711DFB765907}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B82C7BB1-A62A-47A5-A4F8-711DFB765907}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B82C7BB1-A62A-47A5-A4F8-711DFB765907}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{B82C7BB1-A62A-47A5-A4F8-711DFB765907}.Debug|x64.ActiveCfg = Debug|x64
{B82C7BB1-A62A-47A5-A4F8-711DFB765907}.Debug|x64.Build.0 = Debug|x64
{B82C7BB1-A62A-47A5-A4F8-711DFB765907}.Debug|x64.Deploy.0 = Debug|x64
{B82C7BB1-A62A-47A5-A4F8-711DFB765907}.Debug|x86.ActiveCfg = Debug|x86
{B82C7BB1-A62A-47A5-A4F8-711DFB765907}.Debug|x86.Build.0 = Debug|x86
{B82C7BB1-A62A-47A5-A4F8-711DFB765907}.Debug|x86.Deploy.0 = Debug|x86
{B82C7BB1-A62A-47A5-A4F8-711DFB765907}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B82C7BB1-A62A-47A5-A4F8-711DFB765907}.Release|Any CPU.Build.0 = Release|Any CPU
{B82C7BB1-A62A-47A5-A4F8-711DFB765907}.Release|Any CPU.Deploy.0 = Release|Any CPU
{B82C7BB1-A62A-47A5-A4F8-711DFB765907}.Release|x64.ActiveCfg = Release|x64
{B82C7BB1-A62A-47A5-A4F8-711DFB765907}.Release|x64.Build.0 = Release|x64
{B82C7BB1-A62A-47A5-A4F8-711DFB765907}.Release|x64.Deploy.0 = Release|x64
{B82C7BB1-A62A-47A5-A4F8-711DFB765907}.Release|x86.ActiveCfg = Release|x86
{B82C7BB1-A62A-47A5-A4F8-711DFB765907}.Release|x86.Build.0 = Release|x86
{B82C7BB1-A62A-47A5-A4F8-711DFB765907}.Release|x86.Deploy.0 = Release|x86
{C710FE8F-6EA8-4610-85BA-2E857B2B1A58}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C710FE8F-6EA8-4610-85BA-2E857B2B1A58}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C710FE8F-6EA8-4610-85BA-2E857B2B1A58}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{C710FE8F-6EA8-4610-85BA-2E857B2B1A58}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C710FE8F-6EA8-4610-85BA-2E857B2B1A58}.Release|Any CPU.Build.0 = Release|Any CPU
{C710FE8F-6EA8-4610-85BA-2E857B2B1A58}.Release|Any CPU.Deploy.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {61F7FB11-1E47-470C-91E2-47F8143E1572}
SolutionGuid = {746F8B53-294C-4495-A6CD-97ED596BCCEA}
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
namespace CreatePdfDemoSample;

public partial class App : Application
namespace CreatePdfDemoSample
{
public App()
{
InitializeComponent();
public partial class App : Application
{
public App()
{
InitializeComponent();

MainPage = new AppShell();
}
MainPage = new AppShell();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:CreatePdfDemoSample"
Shell.FlyoutBehavior="Disabled">
Shell.FlyoutBehavior="Disabled"
Title="CreatePdfDemoSample">

<ShellContent
Title="Home"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
namespace CreatePdfDemoSample;

public partial class AppShell : Shell
namespace CreatePdfDemoSample
{
public AppShell()
{
InitializeComponent();
}
public partial class AppShell : Shell
{
public AppShell()
{
InitializeComponent();
}
}
}
Original file line number Diff line number Diff line change
@@ -1,34 +1,41 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.0-windows10.0.19041.0</TargetFrameworks>
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
<!-- <TargetFrameworks>$(TargetFrameworks);net6.0-tizen</TargetFrameworks> -->
<!-- <TargetFrameworks>$(TargetFrameworks);net8.0-tizen</TargetFrameworks> -->

<!-- Note for MacCatalyst:
The default runtime is maccatalyst-x64, except in Release config, in which case the default is maccatalyst-x64;maccatalyst-arm64.
When specifying both architectures, use the plural <RuntimeIdentifiers> instead of the singular <RuntimeIdentifier>.
The Mac App Store will NOT accept apps with ONLY maccatalyst-arm64 indicated;
either BOTH runtimes must be indicated or ONLY macatalyst-x64. -->
<!-- For example: <RuntimeIdentifiers>maccatalyst-x64;maccatalyst-arm64</RuntimeIdentifiers> -->

<OutputType>Exe</OutputType>
<RootNamespace>CreatePdfDemoSample</RootNamespace>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

<!-- Display name -->
<ApplicationTitle>CreatePdfDemoSample</ApplicationTitle>

<!-- App Identifier -->
<ApplicationId>com.companyname.createpdfdemosample</ApplicationId>
<ApplicationIdGuid>86FB9E37-9C1D-47C8-9064-01E819035C90</ApplicationIdGuid>

<!-- Versions -->
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
<ApplicationVersion>1</ApplicationVersion>

<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">14.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">11.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">13.1</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>
<Platforms>AnyCPU;x64;x86</Platforms>
</PropertyGroup>

<ItemGroup>
Expand All @@ -40,7 +47,7 @@

<!-- Images -->
<MauiImage Include="Resources\Images\*" />
<MauiImage Update="Resources\Images\dotnet_bot.svg" BaseSize="168,208" />
<MauiImage Update="Resources\Images\dotnet_bot.png" Resize="True" BaseSize="300,185" />

<!-- Custom Fonts -->
<MauiFont Include="Resources\Fonts\*" />
Expand All @@ -50,28 +57,22 @@
</ItemGroup>

<ItemGroup>
<MauiFont Remove="Resources\Fonts\OpenSans-Regular.ttf" />
</ItemGroup>

<ItemGroup>
<MauiImage Remove="Resources\Images\adventure.png" />
</ItemGroup>

<ItemGroup>
<None Remove="Resources\Images\adventure.png" />
<None Remove="Resources\Pdf\AdventureCycle.txt" />
<None Remove="Resources\Pdf\AdventureWork.png" />
<None Remove="Resources\Pdf\arial.ttf" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="Resources\Fonts\OpenSans-Regular.ttf">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="Resources\Images\adventure.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="Resources\Pdf\AdventureCycle.txt" />
<EmbeddedResource Include="Resources\Pdf\AdventureWork.png" />
<EmbeddedResource Include="Resources\Pdf\arial.ttf" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Syncfusion.Pdf.NET" Version="20.2.0.45" />
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="$(MauiVersion)" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
<PackageReference Include="Syncfusion.Pdf.NET" Version="24.2.4" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,8 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ActiveDebugFramework>net6.0-windows10.0.19041.0</ActiveDebugFramework>
<IsFirstTimeProjectOpen>False</IsFirstTimeProjectOpen>
<ActiveDebugProfile>Windows Machine</ActiveDebugProfile>
<ActiveDebugFramework>net8.0-android</ActiveDebugFramework>
<ActiveDebugProfile>Pixel 5 - API 33 (Android 13.0 - API 33)</ActiveDebugProfile>
<SelectedPlatformGroup>Emulator</SelectedPlatformGroup>
<DefaultDevice>pixel_5_-_api_33</DefaultDevice>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetPlatformIdentifier)'=='iOS'">
<RuntimeIdentifier>ios-arm64</RuntimeIdentifier>
<PlatformTarget>arm64</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net8.0-android|AnyCPU'">
<DebuggerFlavor>ProjectDebugger</DebuggerFlavor>
</PropertyGroup>
<ItemGroup>
<None Update="App.xaml">
<SubType>Designer</SubType>
</None>
<None Update="AppShell.xaml">
<SubType>Designer</SubType>
</None>
<None Update="MainPage.xaml">
<SubType>Designer</SubType>
</None>
<None Update="Platforms\Windows\App.xaml">
<SubType>Designer</SubType>
</None>
<None Update="Platforms\Windows\Package.appxmanifest">
<SubType>Designer</SubType>
</None>
<None Update="Resources\Styles\Colors.xaml">
<SubType>Designer</SubType>
</None>
<None Update="Resources\Styles\Styles.xaml">
<SubType>Designer</SubType>
</None>
</ItemGroup>
</Project>

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@
x:Class="CreatePdfDemoSample.MainPage">

<ScrollView>

<Button
x:Name="CounterBtn"
Text="Create PDF"
FontAttributes="Bold"
Grid.Row="3"
Clicked="CreatePDF_Click"
HorizontalOptions="Center"
VerticalOptions="Center"/>
<Button
Text="Create PDF"
FontAttributes="Bold"
Grid.Row="3"
Clicked="createPdf_Click"
HorizontalOptions="Center"
VerticalOptions="Center"/>
</ScrollView>

</ContentPage>
Loading

0 comments on commit 74edc09

Please sign in to comment.