diff options
author | Robin Watts <Robin.Watts@artifex.com> | 2020-05-20 14:45:15 +0100 |
---|---|---|
committer | Robin Watts <Robin.Watts@artifex.com> | 2020-05-20 19:50:36 +0100 |
commit | cf15813c35a75067e828608c665dae30999f8dd5 (patch) | |
tree | f800715c8996c24466094956004ba3b7b088c3c0 /toolbin | |
parent | 8c7bd787defa071c96289b7da9397f673fddb874 (diff) | |
download | ghostpdl-cf15813c35a75067e828608c665dae30999f8dd5.tar.gz |
Update Acrobat2Tiff to VS2019
Diffstat (limited to 'toolbin')
6 files changed, 63 insertions, 88 deletions
diff --git a/toolbin/Acrobat2Tiff/Acrobat2Tiff.sln b/toolbin/Acrobat2Tiff/Acrobat2Tiff.sln index de3d9ba6c..49ca89629 100644 --- a/toolbin/Acrobat2Tiff/Acrobat2Tiff.sln +++ b/toolbin/Acrobat2Tiff/Acrobat2Tiff.sln @@ -1,6 +1,8 @@ -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30104.148 +MinimumVisualStudioVersion = 10.0.40219.1 Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Acrobat2Tiff", "Acrobat2Tiff\Acrobat2Tiff.vbproj", "{7A41EF6A-2A49-4018-94E7-CE144E33D39D}" EndProject Global @@ -17,4 +19,7 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {9154FE35-6D39-44CF-B5F8-553507580CBC} + EndGlobalSection EndGlobal diff --git a/toolbin/Acrobat2Tiff/Acrobat2Tiff/Acrobat2Tiff.vb b/toolbin/Acrobat2Tiff/Acrobat2Tiff/Acrobat2Tiff.vb index 286a81f70..6feba51e9 100644 --- a/toolbin/Acrobat2Tiff/Acrobat2Tiff/Acrobat2Tiff.vb +++ b/toolbin/Acrobat2Tiff/Acrobat2Tiff/Acrobat2Tiff.vb @@ -15,8 +15,8 @@ Module Acrobat2Tiff Console.WriteLine(" using [ -gray | -mono | -rgb | -cmyk ]") Console.WriteLine(" Resolution defaults to 72dpi, but may be specified e.g. -r 300") Console.WriteLine("") - Console.WriteLine("Tested with Acrobat 9.0, will hopefully work with 7/8/10/11/DC too.") - Console.WriteLine("Ensure you have no other Acrobat processes running, or the colorspace") + Console.WriteLine("Tested with Acrobat 9.0, will hopefully work with 7/8/10/11/DC too.") + Console.WriteLine("Ensure you have no other Acrobat processes running, or the colorspace") Console.WriteLine("and Resolution of output images may be wrong.") End Sub @@ -45,10 +45,11 @@ Module Acrobat2Tiff Dim i As Integer Dim cspace As Integer Dim infile As String - Dim outfile As String + Dim outfile As String + Dim result As Integer - ' Set defaults - infile = "" + ' Set defaults + infile = "" outfile = "" res = 72 cspace = 1 @@ -95,14 +96,14 @@ Module Acrobat2Tiff Return End If - 'Console.WriteLine("Input: '" & infile & "'") - 'Console.WriteLine("Output: '" & outfile & "'") - 'Console.WriteLine("Resolution: " & CStr(res)) - 'Console.WriteLine("CSpace: " & CStr(cspace)) + Console.WriteLine("Input: '" & infile & "'") + Console.WriteLine("Output: '" & outfile & "'") + Console.WriteLine("Resolution: " & CStr(res)) + Console.WriteLine("CSpace: " & CStr(cspace)) - ' Set the registry values - setRegistryKeys("HKEY_CURRENT_USER\Software\Adobe\Adobe Acrobat\7.0\AVConversionFromPDF\cSettings", "TIFF", res, cspace) - setRegistryKeys("HKEY_CURRENT_USER\Software\Adobe\Adobe Acrobat\8.0\AVConversionFromPDF\cSettings", "TIFF", res, cspace) + ' Set the registry values + setRegistryKeys("HKEY_CURRENT_USER\Software\Adobe\Adobe Acrobat\7.0\AVConversionFromPDF\cSettings", "TIFF", res, cspace) + setRegistryKeys("HKEY_CURRENT_USER\Software\Adobe\Adobe Acrobat\8.0\AVConversionFromPDF\cSettings", "TIFF", res, cspace) setRegistryKeys("HKEY_CURRENT_USER\Software\Adobe\Adobe Acrobat\9.0\AVConversionFromPDF\cSettings", "TIFF", res, cspace) setRegistryKeys("HKEY_CURRENT_USER\Software\Adobe\Adobe Acrobat\10.0\AVConversionFromPDF\cSettings", "TIFF", res, cspace) setRegistryKeys("HKEY_CURRENT_USER\Software\Adobe\Adobe Acrobat\11.0\AVConversionFromPDF\cSettings", "TIFF", res, cspace) @@ -114,17 +115,19 @@ Module Acrobat2Tiff ' Create Acrobat Document object PDDoc = CreateObject("AcroExch.PDDoc") - ' Open PDF file - PDDoc.Open(infile) + ' Open PDF file + result = PDDoc.Open(infile) - ' Hide Acrobat application so everything is done in silent mode - PDFApp.Hide() + ' Hide Acrobat application so everything is done in silent mode + 'PDFApp.Hide() - ' Create Javascript bridge object - JSObj = PDDoc.GetJSObject() + ' Create Javascript bridge object - ' Create Tiff file - JSObj.SaveAs(outfile, "com.adobe.acrobat.tiff") + JSObj = PDDoc.GetJSObject + result = PDDoc.GetNumPages + + ' Create Tiff file + JSObj.SaveAs(outfile, "com.adobe.acrobat.tiff") PDDoc.Close() PDFApp.CloseAllDocs() diff --git a/toolbin/Acrobat2Tiff/Acrobat2Tiff/Acrobat2Tiff.vbproj b/toolbin/Acrobat2Tiff/Acrobat2Tiff/Acrobat2Tiff.vbproj index 2d53c9024..788eca7ae 100644 --- a/toolbin/Acrobat2Tiff/Acrobat2Tiff/Acrobat2Tiff.vbproj +++ b/toolbin/Acrobat2Tiff/Acrobat2Tiff/Acrobat2Tiff.vbproj @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="Current"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> @@ -11,6 +11,11 @@ <RootNamespace>Acrobat2Tiff</RootNamespace> <AssemblyName>Acrobat2Tiff</AssemblyName> <MyType>Console</MyType> + <FileUpgradeFlags> + </FileUpgradeFlags> + <UpgradeBackupLocation> + </UpgradeBackupLocation> + <OldToolsVersion>2.0</OldToolsVersion> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> @@ -19,7 +24,7 @@ <DefineTrace>true</DefineTrace> <OutputPath>bin\Debug\</OutputPath> <DocumentationFile>Acrobat2Tiff.xml</DocumentationFile> - <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn> + <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022,42353,42354,42355</NoWarn> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> @@ -28,7 +33,7 @@ <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DocumentationFile>Acrobat2Tiff.xml</DocumentationFile> - <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn> + <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022,42353,42354,42355</NoWarn> </PropertyGroup> <ItemGroup> <Reference Include="System" /> @@ -50,6 +55,7 @@ <Compile Include="Acrobat2Tiff\Application.Designer.vb"> <AutoGen>True</AutoGen> <DependentUpon>Application.myapp</DependentUpon> + <DesignTime>True</DesignTime> </Compile> <Compile Include="Acrobat2Tiff\Resources.Designer.vb"> <AutoGen>True</AutoGen> @@ -91,6 +97,9 @@ <Isolated>False</Isolated> </COMReference> </ItemGroup> + <ItemGroup> + <Folder Include="My Project\" /> + </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.VisualBasic.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. diff --git a/toolbin/Acrobat2Tiff/Acrobat2Tiff/Acrobat2Tiff/Application.Designer.vb b/toolbin/Acrobat2Tiff/Acrobat2Tiff/Acrobat2Tiff/Application.Designer.vb index df166d723..88dd01c78 100644 --- a/toolbin/Acrobat2Tiff/Acrobat2Tiff/Acrobat2Tiff/Application.Designer.vb +++ b/toolbin/Acrobat2Tiff/Acrobat2Tiff/Acrobat2Tiff/Application.Designer.vb @@ -1,7 +1,7 @@ '------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. -' Runtime Version:2.0.50727.3603 +' Runtime Version:4.0.30319.42000 ' ' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated. diff --git a/toolbin/Acrobat2Tiff/Acrobat2Tiff/Acrobat2Tiff/Resources.Designer.vb b/toolbin/Acrobat2Tiff/Acrobat2Tiff/Acrobat2Tiff/Resources.Designer.vb index 5ebe3541f..e019990c9 100644 --- a/toolbin/Acrobat2Tiff/Acrobat2Tiff/Acrobat2Tiff/Resources.Designer.vb +++ b/toolbin/Acrobat2Tiff/Acrobat2Tiff/Acrobat2Tiff/Resources.Designer.vb @@ -1,7 +1,7 @@ '------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. -' Runtime Version:2.0.50727.3603 +' Runtime Version:4.0.30319.42000 ' ' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated. @@ -11,6 +11,7 @@ Option Strict On Option Explicit On +Imports System Namespace My.Resources @@ -18,10 +19,10 @@ Namespace My.Resources 'class via a tool like ResGen or Visual Studio. 'To add or remove a member, edit your .ResX file then rerun ResGen 'with the /str option, or rebuild your VS project. - '<summary> - ' A strongly-typed resource class, for looking up localized strings, etc. - '</summary> - <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0"), _ + '''<summary> + ''' A strongly-typed resource class, for looking up localized strings, etc. + '''</summary> + <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0"), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _ @@ -31,9 +32,9 @@ Namespace My.Resources Private resourceCulture As Global.System.Globalization.CultureInfo - '<summary> - ' Returns the cached ResourceManager instance used by this class. - '</summary> + '''<summary> + ''' Returns the cached ResourceManager instance used by this class. + '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager Get @@ -45,16 +46,16 @@ Namespace My.Resources End Get End Property - '<summary> - ' Overrides the current thread's CurrentUICulture property for all - ' resource lookups using this strongly typed resource class. - '</summary> + '''<summary> + ''' Overrides the current thread's CurrentUICulture property for all + ''' resource lookups using this strongly typed resource class. + '''</summary> <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend Property Culture() As Global.System.Globalization.CultureInfo Get Return resourceCulture End Get - Set(ByVal value As Global.System.Globalization.CultureInfo) + Set resourceCulture = value End Set End Property diff --git a/toolbin/Acrobat2Tiff/Acrobat2Tiff/Acrobat2Tiff/Settings.Designer.vb b/toolbin/Acrobat2Tiff/Acrobat2Tiff/Acrobat2Tiff/Settings.Designer.vb index 17ea681f2..6ef3ea502 100644 --- a/toolbin/Acrobat2Tiff/Acrobat2Tiff/Acrobat2Tiff/Settings.Designer.vb +++ b/toolbin/Acrobat2Tiff/Acrobat2Tiff/Acrobat2Tiff/Settings.Designer.vb @@ -1,7 +1,7 @@ '------------------------------------------------------------------------------ ' <auto-generated> ' This code was generated by a tool. -' Runtime Version:2.0.50727.3603 +' Runtime Version:4.0.30319.42000 ' ' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated. @@ -13,61 +13,18 @@ Option Explicit On Namespace My - + <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ - Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "8.0.0.0"), _ - Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ - Partial Friend NotInheritable Class MySettings + Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.5.0.0")> _ + Partial Friend NotInheritable Class Settings Inherits Global.System.Configuration.ApplicationSettingsBase - Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings), MySettings) + Private Shared defaultInstance As Settings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New Settings()),Settings) -#Region "My.Settings Auto-Save Functionality" -#If _MyType = "WindowsForms" Then - Private Shared addedHandler As Boolean - - Private Shared addedHandlerLockObject As New Object - - <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ - Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs) - If My.Application.SaveMySettingsOnExit Then - My.Settings.Save() - End If - End Sub -#End If -#End Region - - Public Shared ReadOnly Property [Default]() As MySettings + Public Shared ReadOnly Property [Default]() As Settings Get - -#If _MyType = "WindowsForms" Then - If Not addedHandler Then - SyncLock addedHandlerLockObject - If Not addedHandler Then - AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings - addedHandler = True - End If - End SyncLock - End If -#End If Return defaultInstance End Get End Property End Class End Namespace - -Namespace My - - <Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _ - Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ - Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _ - Friend Module MySettingsProperty - - <Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _ - Friend ReadOnly Property Settings() As Global.Acrobat2Tiff.My.MySettings - Get - Return Global.Acrobat2Tiff.My.MySettings.Default - End Get - End Property - End Module -End Namespace |