Skip to content

Commit

Permalink
Merge pull request #120 from Sicos1977/revert-119-master
Browse files Browse the repository at this point in the history
Revert "fixed OSX issue with M1 processor"
  • Loading branch information
Sicos1977 authored Aug 16, 2023
2 parents c261020 + ffeeac9 commit d89df02
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 30 deletions.
16 changes: 4 additions & 12 deletions ChromiumHtmlToPdfConsole/ChromiumHtmlToPdfConsole.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<StartupObject>ChromiumHtmlToPdfConsole.Program</StartupObject>
<ApplicationIcon />
<AssemblyVersion>2.6.5.0</AssemblyVersion>
Expand All @@ -24,17 +24,16 @@
<RootNamespace>ChromiumHtmlToPdfConsole</RootNamespace>
<FileVersion>3.0.0.0</FileVersion>
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
<LangVersion>default</LangVersion>
</PropertyGroup>

<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="AngleSharp" Version="1.0.4" />
<PackageReference Include="AngleSharp.Io" Version="1.0.0" />
<PackageReference Include="AngleSharp.Xml" Version="1.0.0" />
<PackageReference Include="AngleSharp" Version="0.17.1" />
<PackageReference Include="AngleSharp.Io" Version="0.17.0" />
<PackageReference Include="AngleSharp.Xml" Version="0.17.0" />
<PackageReference Include="CommandLineParser" Version="2.9.1" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0" />
<PackageReference Include="System.Drawing.Common" Version="7.0.0" />
Expand All @@ -51,11 +50,4 @@
<ProjectReference Include="..\ChromiumHtmlToPdfLib\ChromiumHtmlToPdfLib.csproj" />
</ItemGroup>

<ItemGroup>
<None Remove="test.htm" />
<Content Include="test.htm">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion ChromiumHtmlToPdfConsole/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"profiles": {
"ChromeHtmlToPdf": {
"commandName": "Project",
"commandLineArgs": "--input \"test.htm\" --output test.pdf --log-network-traffic --media-load-timeout 5000 --image-load-timeout 5000 --paper-format A4"
"commandLineArgs": "--input \"d:\\test.htm\" --output d:\\test.pdf --log-network-traffic --media-load-timeout 5000 --image-resize true --image-load-timeout 5000 --paper-format A4"
}
}
}
9 changes: 0 additions & 9 deletions ChromiumHtmlToPdfConsole/test.htm

This file was deleted.

11 changes: 5 additions & 6 deletions ChromiumHtmlToPdfLib/ChromiumHtmlToPdfLib.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;netstandard2.0</TargetFrameworks>
<Version>3.1.1</Version>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<Description>ChromiumHtmlToPdf is a 100% managed C# .NETStandard 2.0 library that can be used to convert HTML to PDF or PNG format with the use of Google Chrome or Microsoft Edge</Description>
Expand All @@ -25,16 +26,14 @@
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
<TargetFramework>net7.0</TargetFramework>
<LangVersion>default</LangVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AngleSharp" Version="1.0.4" />
<PackageReference Include="AngleSharp" Version="0.17.1" />
<PackageReference Include="AngleSharp.Css" Version="0.17.0" />
<PackageReference Include="AngleSharp.Io" Version="1.0.0" />
<PackageReference Include="AngleSharp.Xml" Version="1.0.0" />
<PackageReference Include="HtmlSanitizer" Version="8.0.692" />
<PackageReference Include="AngleSharp.Io" Version="0.17.0" />
<PackageReference Include="AngleSharp.Xml" Version="0.17.0" />
<PackageReference Include="HtmlSanitizer" Version="8.0.645" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.1" />
<PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
Expand Down
4 changes: 2 additions & 2 deletions ChromiumHtmlToPdfLib/Helpers/ChromeFinder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ private static void GetApplicationDirectories(ICollection<string> directories)
directories.Add("/opt/google/chrome");
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
directories.Add("/Applications");
throw new Exception("Finding Chrome on MacOS is currently not supported, please contact the programmer.");
}
#endregion

Expand Down Expand Up @@ -115,7 +115,7 @@ public static string Find()
{
exeNames.Add("Google Chrome.app/Contents/MacOS/Google Chrome");
exeNames.Add("Chromium.app/Contents/MacOS/Chromium");
exeNames.Add("Google Chrome.app/Contents/MacOS/Google Chrome");
exeNames.Add("/Applications/Google Chrome.app/Contents/MacOS/Google Chrome");
}

// Check the directory of this assembly/application
Expand Down

0 comments on commit d89df02

Please sign in to comment.