File tree Expand file tree Collapse file tree
Open and Save PDF document/.NET MAUI/Load_and_Save_PDF_MAUI/Load_and_Save_PDF_MAUI Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk" >
22
33 <PropertyGroup >
4- <TargetFrameworks >net7 .0-android;net7 .0-ios;net7 .0-maccatalyst</TargetFrameworks >
5- <TargetFrameworks Condition =" $([MSBuild]::IsOSPlatform('windows'))" >$(TargetFrameworks);net7 .0-windows10.0.19041.0</TargetFrameworks >
4+ <TargetFrameworks >net8 .0-android;net8 .0-ios;net8 .0-maccatalyst</TargetFrameworks >
5+ <TargetFrameworks Condition =" $([MSBuild]::IsOSPlatform('windows'))" >$(TargetFrameworks);net8 .0-windows10.0.19041.0</TargetFrameworks >
66 <!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
7- <!-- <TargetFrameworks>$(TargetFrameworks);net7 .0-tizen</TargetFrameworks> -->
7+ <!-- <TargetFrameworks>$(TargetFrameworks);net8 .0-tizen</TargetFrameworks> -->
88 <OutputType >Exe</OutputType >
99 <RootNamespace >Load_and_Save_PDF_MAUI</RootNamespace >
1010 <UseMaui >true</UseMaui >
5959 </ItemGroup >
6060
6161 <ItemGroup >
62- <PackageReference Include =" Microsoft.Extensions.Logging.Debug" Version =" 7 .0.0" />
62+ <PackageReference Include =" Microsoft.Extensions.Logging.Debug" Version =" 8 .0.0" />
6363 <PackageReference Include =" Syncfusion.Pdf.NET" Version =" *" />
6464 </ItemGroup >
6565
Original file line number Diff line number Diff line change 22<Project ToolsVersion =" Current" xmlns =" http://schemas.microsoft.com/developer/msbuild/2003" >
33 <PropertyGroup >
44 <IsFirstTimeProjectOpen >False</IsFirstTimeProjectOpen >
5- <ActiveDebugFramework >net7 .0-windows10.0.19041.0</ActiveDebugFramework >
5+ <ActiveDebugFramework >net8 .0-windows10.0.19041.0</ActiveDebugFramework >
66 <ActiveDebugProfile >Windows Machine</ActiveDebugProfile >
77 </PropertyGroup >
88</Project >
Original file line number Diff line number Diff line change 1+ #region Copyright Syncfusion® Inc. 2001-2025.
2+ // Copyright Syncfusion® Inc. 2001-2025. All rights reserved.
3+ // Use of this code is subject to the terms of our license.
4+ // A copy of the current license can be obtained at any time by e-mailing
5+ // licensing@syncfusion.com. Any infringement will be prosecuted under
6+ // applicable laws.
7+ #endregion
8+ using QuickLook ;
9+
10+ public class PreviewControllerDS : QLPreviewControllerDataSource
11+ {
12+ private readonly QLPreviewItem _item ;
13+
14+ public PreviewControllerDS ( QLPreviewItem item )
15+ {
16+ _item = item ;
17+ }
18+
19+ public override nint PreviewItemCount ( QLPreviewController controller )
20+ {
21+ return ( nint ) 1 ;
22+ }
23+
24+ public override IQLPreviewItem GetPreviewItem ( QLPreviewController controller , nint index )
25+ {
26+ return _item ;
27+ }
28+ }
Original file line number Diff line number Diff line change 1+ #region Copyright Syncfusion® Inc. 2001-2025.
2+ // Copyright Syncfusion® Inc. 2001-2025. All rights reserved.
3+ // Use of this code is subject to the terms of our license.
4+ // A copy of the current license can be obtained at any time by e-mailing
5+ // licensing@syncfusion.com. Any infringement will be prosecuted under
6+ // applicable laws.
7+ #endregion
8+ using Foundation ;
9+ using QuickLook ;
10+ using System . IO ;
11+
12+ public class QLPreviewItemFileSystem : QLPreviewItem
13+ {
14+ readonly string _fileName , _filePath ;
15+
16+ public QLPreviewItemFileSystem ( string fileName , string filePath )
17+ {
18+ _fileName = fileName ;
19+ _filePath = filePath ;
20+ }
21+
22+ public override string PreviewItemTitle
23+ {
24+ get
25+ {
26+ return _fileName ;
27+ }
28+ }
29+ public override NSUrl PreviewItemUrl
30+ {
31+ get
32+ {
33+ return NSUrl . FromFilename ( _filePath ) ;
34+ }
35+ }
36+ }
37+
38+ public class QLPreviewItemBundle : QLPreviewItem
39+ {
40+ readonly string _fileName , _filePath ;
41+ public QLPreviewItemBundle ( string fileName , string filePath )
42+ {
43+ _fileName = fileName ;
44+ _filePath = filePath ;
45+ }
46+
47+ public override string PreviewItemTitle
48+ {
49+ get
50+ {
51+ return _fileName ;
52+ }
53+ }
54+ public override NSUrl PreviewItemUrl
55+ {
56+ get
57+ {
58+ var documents = NSBundle . MainBundle . BundlePath ;
59+ var lib = Path . Combine ( documents , _filePath ) ;
60+ var url = NSUrl . FromFilename ( lib ) ;
61+ return url ;
62+ }
63+ }
64+ }
65+
You can’t perform that action at this time.
0 commit comments