Skip to content

Commit

Permalink
initial
Browse files Browse the repository at this point in the history
  • Loading branch information
glestwid committed Jul 18, 2024
1 parent 87603f8 commit 4532d50
Show file tree
Hide file tree
Showing 18 changed files with 418 additions and 80 deletions.
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[*.cs]

# IDE0055: Fix formatting
dotnet_diagnostic.IDE0055.severity = none
44 changes: 0 additions & 44 deletions BuildAll-PdfSharp-VS2015.sln

This file was deleted.

80 changes: 80 additions & 0 deletions BuildAll-PdfSharp-VS2022.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30621.155
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PdfSharp", "PdfSharp\PdfSharp.csproj", "{5384CE57-1F94-4D22-860D-2E9C1AC12DDF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PdfSharp.Charting", "PdfSharp.Charting\PdfSharp.Charting.csproj", "{CFDB7D46-EA8D-47DE-B10A-9E755A1B48BA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleAppBofA", "ConsoleApp1\ConsoleAppBofA.csproj", "{4769F931-8938-42F2-BD28-E639501449F6}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{20C0C227-B417-4EC8-B515-C66942B59B96}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleAppTin", "ConsoleAppTin\ConsoleAppTin.csproj", "{24B435BC-B87F-4FCB-8FDC-19EE823E6C7D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|Mixed Platforms = Debug|Mixed Platforms
Debug|Win32 = Debug|Win32
Release|Any CPU = Release|Any CPU
Release|Mixed Platforms = Release|Mixed Platforms
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{5384CE57-1F94-4D22-860D-2E9C1AC12DDF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5384CE57-1F94-4D22-860D-2E9C1AC12DDF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5384CE57-1F94-4D22-860D-2E9C1AC12DDF}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{5384CE57-1F94-4D22-860D-2E9C1AC12DDF}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{5384CE57-1F94-4D22-860D-2E9C1AC12DDF}.Debug|Win32.ActiveCfg = Debug|Any CPU
{5384CE57-1F94-4D22-860D-2E9C1AC12DDF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5384CE57-1F94-4D22-860D-2E9C1AC12DDF}.Release|Any CPU.Build.0 = Release|Any CPU
{5384CE57-1F94-4D22-860D-2E9C1AC12DDF}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{5384CE57-1F94-4D22-860D-2E9C1AC12DDF}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{5384CE57-1F94-4D22-860D-2E9C1AC12DDF}.Release|Win32.ActiveCfg = Release|Any CPU
{CFDB7D46-EA8D-47DE-B10A-9E755A1B48BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CFDB7D46-EA8D-47DE-B10A-9E755A1B48BA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CFDB7D46-EA8D-47DE-B10A-9E755A1B48BA}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{CFDB7D46-EA8D-47DE-B10A-9E755A1B48BA}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{CFDB7D46-EA8D-47DE-B10A-9E755A1B48BA}.Debug|Win32.ActiveCfg = Debug|Any CPU
{CFDB7D46-EA8D-47DE-B10A-9E755A1B48BA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CFDB7D46-EA8D-47DE-B10A-9E755A1B48BA}.Release|Any CPU.Build.0 = Release|Any CPU
{CFDB7D46-EA8D-47DE-B10A-9E755A1B48BA}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{CFDB7D46-EA8D-47DE-B10A-9E755A1B48BA}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{CFDB7D46-EA8D-47DE-B10A-9E755A1B48BA}.Release|Win32.ActiveCfg = Release|Any CPU
{4769F931-8938-42F2-BD28-E639501449F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4769F931-8938-42F2-BD28-E639501449F6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4769F931-8938-42F2-BD28-E639501449F6}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{4769F931-8938-42F2-BD28-E639501449F6}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{4769F931-8938-42F2-BD28-E639501449F6}.Debug|Win32.ActiveCfg = Debug|Any CPU
{4769F931-8938-42F2-BD28-E639501449F6}.Debug|Win32.Build.0 = Debug|Any CPU
{4769F931-8938-42F2-BD28-E639501449F6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4769F931-8938-42F2-BD28-E639501449F6}.Release|Any CPU.Build.0 = Release|Any CPU
{4769F931-8938-42F2-BD28-E639501449F6}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{4769F931-8938-42F2-BD28-E639501449F6}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{4769F931-8938-42F2-BD28-E639501449F6}.Release|Win32.ActiveCfg = Release|Any CPU
{4769F931-8938-42F2-BD28-E639501449F6}.Release|Win32.Build.0 = Release|Any CPU
{24B435BC-B87F-4FCB-8FDC-19EE823E6C7D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{24B435BC-B87F-4FCB-8FDC-19EE823E6C7D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{24B435BC-B87F-4FCB-8FDC-19EE823E6C7D}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{24B435BC-B87F-4FCB-8FDC-19EE823E6C7D}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{24B435BC-B87F-4FCB-8FDC-19EE823E6C7D}.Debug|Win32.ActiveCfg = Debug|Any CPU
{24B435BC-B87F-4FCB-8FDC-19EE823E6C7D}.Debug|Win32.Build.0 = Debug|Any CPU
{24B435BC-B87F-4FCB-8FDC-19EE823E6C7D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{24B435BC-B87F-4FCB-8FDC-19EE823E6C7D}.Release|Any CPU.Build.0 = Release|Any CPU
{24B435BC-B87F-4FCB-8FDC-19EE823E6C7D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{24B435BC-B87F-4FCB-8FDC-19EE823E6C7D}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{24B435BC-B87F-4FCB-8FDC-19EE823E6C7D}.Release|Win32.ActiveCfg = Release|Any CPU
{24B435BC-B87F-4FCB-8FDC-19EE823E6C7D}.Release|Win32.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F30C5B80-7023-480C-9B60-D5C2A7EA348D}
EndGlobalSection
EndGlobal
6 changes: 6 additions & 0 deletions ConsoleApp1/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>
63 changes: 63 additions & 0 deletions ConsoleApp1/ConsoleAppBofA.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{4769F931-8938-42F2-BD28-E639501449F6}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>ConsoleApp1</RootNamespace>
<AssemblyName>ConsoleApp1</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\PdfSharp.Charting\PdfSharp.Charting.csproj">
<Project>{cfdb7d46-ea8d-47de-b10a-9e755a1b48ba}</Project>
<Name>PdfSharp.Charting</Name>
</ProjectReference>
<ProjectReference Include="..\PdfSharp\PdfSharp.csproj">
<Project>{5384ce57-1f94-4d22-860d-2e9c1ac12ddf}</Project>
<Name>PdfSharp</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
32 changes: 32 additions & 0 deletions ConsoleApp1/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using PdfSharp.Pdf;
using PdfSharp.Pdf.IO;


namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
var pdfPath = @"C:\TMP\BofA BULLZIP.pdf";
PdfDocument document = PdfReader.Open(pdfPath);
//document.Info.CreationDate = DateTime.MinValue;
//document.Info.ModificationDate = DateTime.MinValue;
document.Info.Author = "Bank of America";
document.Info.Application = "Bank of America";
document.Info.Producer = "TargetStream StreamEDS rv1.7.41 for Bank of America";
document.PdfWriterLayout = PdfWriterLayout.Compact;

document.Info.Elements.Remove(PdfDocumentInformation.Keys.CreationDate);
document.Info.Elements.Remove(PdfDocumentInformation.Keys.ModDate);
pdfPath = @"C:\TMP\BofA - BULLZIP - after PdfSharp.pdf";
document.Save(pdfPath);
}
}
}
36 changes: 36 additions & 0 deletions ConsoleApp1/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("ConsoleApp1")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ConsoleApp1")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("4769f931-8938-42f2-bd28-e639501449f6")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
6 changes: 6 additions & 0 deletions ConsoleAppTin/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>
63 changes: 63 additions & 0 deletions ConsoleAppTin/ConsoleAppTin.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{24B435BC-B87F-4FCB-8FDC-19EE823E6C7D}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>ConsoleAppTin</RootNamespace>
<AssemblyName>ConsoleAppTin</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\PdfSharp.Charting\PdfSharp.Charting.csproj">
<Project>{cfdb7d46-ea8d-47de-b10a-9e755a1b48ba}</Project>
<Name>PdfSharp.Charting</Name>
</ProjectReference>
<ProjectReference Include="..\PdfSharp\PdfSharp.csproj">
<Project>{5384ce57-1f94-4d22-860d-2e9c1ac12ddf}</Project>
<Name>PdfSharp</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
29 changes: 29 additions & 0 deletions ConsoleAppTin/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
using System;

using PdfSharp.Pdf;
using PdfSharp.Pdf.IO;

namespace ConsoleAppTin
{
class Program
{
static void Main(string[] args)
{
var pdfPath = @"C:\TMP\Tel.pdf";
PdfDocument document = PdfReader.Open(pdfPath);
document.Info.Title = "";
document.Info.CreationDate = new DateTime(2024,06,15);
document.Info.ModificationDate = new DateTime(2024, 06, 15);
document.Info.Author = "";
document.Info.Elements.SetValue("ICNAppName", new PdfString("More Advanced Generator" ));
document.Info.Application = "Advanced Generator";
document.Info.Producer = @"iText® 5.4.4 ©2000-2013 1T3XT BVBA (AGPL-version)";
document.PdfWriterLayout = PdfWriterLayout.Compact;

//document.Info.Elements.Remove(PdfDocumentInformation.Keys.CreationDate);
//document.Info.Elements.Remove(PdfDocumentInformation.Keys.ModDate);
pdfPath = @"C:\TMP\Tel - after PdfSharp..pdf";
document.Save(pdfPath);
}
}
}
Loading

0 comments on commit 4532d50

Please sign in to comment.