iac.basの内容

TOP > IAC.BAS > iac.basの内容


はじめに

Adobe Acrobat SDK 8.0 のサンプルに付いていた「iac.bas」ソースの内容です。

OLE(IAC)操作で使う定数が入っています。

Excel VBA からも使用出来ます。

C 言語で使う時は IAC.h の方を使用してください。

VB.NET から使う時は IAC.VB を使用して下さい。

ここに掲載しているIAC.BASの内容は一部コメント部分に手を加えています。

IAC.BASの説明一覧」も参照して下さい。


001 Option Explicit 002 '★ここの説明は一部以下のURLのPDFにあります。 003 '★http://ftp.ktug.or.kr/obsolete/ 004 ' info/adobe/devtechnotes/pdffiles/5165.vwiacref.PDF 005 ' ADOBE SYSTEMS INCORPORATED 006 ' Copyright (C) 1994-2003 Adobe Systems Incorporated 007 ' All rights reserved. 008 ' 009 ' NOTICE: Adobe permits you to use, modify, and distribute this file 010 ' in accordance with the terms of the Adobe license agreement 011 ' accompanying it. If you have received this file from a source other 012 ' than Adobe, then your use, modification, or distribution of it 013 ' requires the prior written permission of Adobe. 014 ' 015 ' ------------------------------------------------------------------ 016 ' 017 ' iac.bas 018 ' 019 ' - This file contains enumerated data types and constants necessary 020 ' for some of the OLE method parameters. It is derived from the C 021 ' header file IAC.h 022 ''**************** AV Things ******************* '' 023 '* AV Application Preferences data type *' 024 '(Read only) The preferences file format version number. 025 Public Const avpPrefsVersion = 0 ' Int32 026 'If true, the “file open” dialog is displayed when 027 ' the Acrobat viewer is launched without a document to open. 028 ' If false, it does not. 029 Public Const avpOpenDialogAtStartup = 1 ' boolean 030 'If true, the Acrobat viewer splash screen is shown 031 032 ' when the Acrobat viewer is launched. If false, it is not. 033 Public Const avpShowSplashAtStartup = 2 ' boolean 034 'If true, the Acrobat viewer’s toolbar is displayed. 035 ' If false, it is not. The toolbar can also be shown and 036 ' hidden by the user. 037 Public Const avpShowToolBar = 3 ' boolean 038 'If true, the Acrobat viewer remembers the location of 039 ' certain dialogs (such as the Find dialog) and displays 040 ' them in their previous location. If false, they are 041 ' displayed in a default location. 042 Public Const avpRememberDialogs = 4 ' boolean 043 'If true, the Acrobat viewer displays short menus. 044 ' If false, it displays long menus. 045 Public Const avpShortMenus = 5 ' boolean 046 'Whether thumbnail images, bookmarks, 047 ' or neither should be shown along with documents by default. 048 ' Must be one of the following: 049 ' PDUseNone . Document only. 050 ' PDUseThumbs . Document plus thumbs. 051 ' PDUseBookmarks . Document plus bookmarks. 052 ' PDFullScreen . Full screen mode. 053 ' PDUseNone ドキュメント専用。 054 ' PDUseThumbs そのうえ、親指を記録してください。 055 ' PDUseBookmarks そのうえ、ブックマークを記録してください。 056 ' PDFullScreen Fullはモードを上映します。 057 Public Const avpDefaultOverviewType = 6 ' Int32 058 'Default magnification when a document is opened. 059 'ドキュメントであるときに、デフォルト倍率は開かれます。 060 Public Const avpDefaultZoomScale = 7 ' Fixed 061 'Default zoom type for a page view. 062 ' Must be one of the values listed in Zoom strategies. 063 Public Const avpDefaultZoomType = 8 ' Int32] 064 065 'If true, the Acrobat viewer displays large images. 066 ' If false, gray boxes are shown in place of large images, 067 ' reducing rendering time for pages with large images. 068 Public Const avpShowLargeImages =&nbsp 069 ;9 ' boolean 070 'If true, text smaller than avpGreekLevel is greeked 071 ' (displayed as gray boxes). If false, all text is drawn, 072 ' regardless of its size. 073 Public Const avpGreekText = 10 ' boolean 074 'Size, in points, below which text is greeked 075 ' if avpGreekText is true. 076 Public Const avpGreekLevel = 11 ' Int32 077 'Determines whether sans serif, serif, or both substitution 078 ' fonts are available when printing. Using only one 079 ' substitution font type generally reduces the quality of 080 ' font substitution, but may allow some files that require 081 ' font substitution to print on PostScript printers that 082 ' have very little memory. The allowed values are: 083 '0 . Use both sans serif and serif 084 '1 . Use sans serif only 085 '2. Use serif only 086 Public Const avpSubstituteFontType = 12 ' Int32 087 'If true, the Acrobat viewer renders using calibrated color. 088 Public Const avpDoCalibratedColor = 13 ' boolean 089 090 'If true, a warning dialog box is not displayed when 091 ' a user deletes notes, bookmarks, links, pages, or 092 ' thumbnails. If false, the dialog box is displayed. 093 Public Const avpSkipWarnings = 14 ' boolean 094 'The PostScript language level to use when printing 095 ' to a PostScript printer. Allowed values are 1 and 2. 096 Public Const avpPSLevel = 15 ' Int32 097 'If true, pages are shrunk to fit the imageable area 098 ' of the printer when printed. If false, pages are not 099 ' shrunk to fit. 100 Public Const avpShrinkToFit = 16 ' boolean 101 'If true, the Acrobat viewer’s Find command 102 ' (not the Search plug-in) performs case-sensitive searches. 103 ' If false, searches are not case-sensitive. 104 Public Const avpCaseSensitive = 17 ' boolean 105 'If true, the Acrobat viewer's Find command 106 ' (not the Search plug-in) matches only whole words. 107 ' If false, the partial words are also matched. 108 Public Const avpWholeWords = 18 ' boolean 109 'Default color to use for new notes. 110 Public Const avpNoteColor = 19 ' PDColorValue 111 'Default label to use for new notes. 112 Public Const avpNoteLabel = 20 ' char 113 'The maximum zoom factor that is automatically used when 114 ' the Acrobat viewer enters “Follow Article” mode. 115 ' A value of 1.0 corresponds to a zoom factor of 100%. 116 Public Const avpMaxThreadZoom = 21 ' Fixed 117 'If true, the following page is rendered offscreen while 118 ' the current page is viewed, improving performance when 119 ' a document is viewed sequentially. If false, no draw-ahead 120 ' is used. 121 Public Const avpEnablePageCache = 22 ' boolean 122 'The background color to use when the Acrobat viewer 123 ' is in Full Screen mode. 124 Public Const avpFullScreenColor = 23 ' PDColorValue 125 Public Const avpUnused1 = 24 &nbsp 126 ; ' obsolete 127 'Maximum zoom factor at which pages will be cached. 128 ' Pages viewed at a higher zoom factor will not cached. 129 ' A value of 1.0 corresponds to a zoom factor of 100%. 130 ' Fixed: pages whose zoom > this will not be cached 131 Public Const avpMaxPageCacheZoom = 25 132 'The minimum number of ticks needed to redraw a page before 133 ' it will be cached. Pages that can be redrawn in less time 134 ' will not be cached. A tick is 1/60 of a second. 135 'Int32: pages which take < this to render will not be cached 136 Public Const avpMinPageCacheTicks = 26 137 'The maximum number of bytes the page cache is allowed to occupy. 138 'Int32: overall constraint on storage used by cache 139 Public Const avpMaxPageCacheBytes = 27 140 Public Const avpUnused2 = 28 ' obsolete 141 'Time (in seconds) to show each page when using 142 ' automatic page changing in full screen mode. 143 Public Const avpFullScreenChangeTimeDelay = 29 ' Int32 144 'If true, the document’s pages are displayed in a loop 145 ' (rather than just once) when using full screen mode. 146 ' If false, they are not. 147 Public Const avpFullScreenLoop = 30 ' boolean 148 'The scale at which thumbnail images are created. 149 ' The Acrobat viewer’s default is fixedEighth, 150 ' creating thumbnail images whose linear dimensions 151 ' are oneeighth those of the actual page. 152 Public Const avpThumbViewScale = 31 ' Fixed 153 Public Const avpThumbViewTimeout = 32 ' Int32 154 'Default destination fit type for creating 155 ' links and bookmarks. 156 Public Const avpDestFitType = 33 ' char 157 'If true, the default for creating new links and 158 ' bookmarks is “Inherit zoom” 159 Public Const avpDestZoomInherit = 34 ' boolean 160 'Int32 (Used on Macintosh only) 161 'Specifies the way in which highlighted text is to be 162 ' displayed. Can have one of the following values: 163 ' #define HIGHLIGHT_PAINT_XOR 0 . 164 ' Paint highlight color in XOR mode 165 ' #define HIGHLIGHT_INVERT_MAC 1 . 166 ' Invert in special Macintosh highlight 167 ' Mode 168 ' #define HIGHLIGHT_INVERT_XOR 2 . 169 ' Invert in XOR mode 170 ' This preference exists because the standard Macintosh 171 ' highlighting generally works quite well, but can 172 ' occasionally become invisible when text is on a 173 ' colored background. 174 Public Const avpHighlightMode = 35 ' Int32 175 'The default width (in pixels) of the portion of 176 ' the document window in which bookmarks and thumbnail 177 ' images are displayed. The actual width can be changed 178 ' by the user. 179 Public Const avpDefaultSplitterPos = 36 ' Int32 180 Public Const avpUnused3 = 37 ' obsolete 181 ' Int32: max # of bytes of Cos object cache per Cos doc. 182 Public Const avpMaxCosDocCache = 38 183 Public Const avpPageUnits = 39 >' PageUnits 184 185 186 Public Const avpNoteFontName = 40 ' char* 187 Public Const avpNoteFontSize = 41 ' Int32 188 Public Const avpRecentFile1 = 42 ' char * 189 Public Const avpRecentFile2 = 43 ' char * 190 Public Const avpRecentFile3 = 44 ' char * 191 Public Const avpRecentFile4 = 45 ' char * 192 Public Const avpHighlightColor = 46 ' PDColorValue 193 Public Const avpFullScreenUseTimer = 47 ' boolean 194 Public Const avpAntialiasText = 48 ' boolean 195 Public Const avpAntialiasLevel = 49 ' Int16 196 Public Const avpPersistentCacheSize = 50 ' Int32 197 Public Const avpPersistentCacheFolder = 51 ' ASPathName 198 Public Const avpPageViewLayoutMode = 52 ' PDLayoutMode 199 Public Const avpSaveAsLinearized = 53 ' boolean 200 Public Const avpMaxOpenDocuments = 54 ' Int32 201 Public Const avpTextSelectWordOrder = 55 ' Int32 202 Public Const avpMarkHiddenPages = 56 ' boolean 203 Public Const avpFullScreenTransitionType = 57 ' char* 204 Public Const avpFullScreenClick = 58 ' boolean 205 Public Const avpFullScreenEscape = 59 ' boolean 206 Public Const avpFullScreenCursor = 60 ' Int16 207 Public Const avpOpenInPlace = 61 ' boolean 208 Public Const avpShowHiddenAnnots = 62 ' boolean 209 Public Const avpFullScreenUsePageTiming = 63 ' boolean 210 Public Const avpDownloadEntireFile = 64 ' boolean 211 Public Const avpEmitHalftones = 65 ' boolean 212 Public Const avpShowMenuBar = 66 ' /*boolean*/ 213 Public Const avpIgnorePageClip = 67 '/*boolean*/ 214 Public Const avpMinimizeBookmarks = 68 '/* boolean*/ 215 Public Const avpShowAnnotSequence = 69 '/*boolean*/ 216 Public Const avpUseLogicalPageNumbers = 70 '/*boolean*/ 217 '/*###cannot use via IAC*/ 218 Public Const avpASExtensionDigCert = 71 219 Public Const avpShowLeftToolBar = 72 '/*boolean*/ 220 Public Const avpConfirmOpenFile = 73 '/*boolean*/ 221 '/*cannot use via IAC*/ 222 Public Const avpNoteLabelEncoding = 74 223 Public Const avpBookmarkShowLocation = 75 '/*boolean*/ 224 Public Const avpUseLocalF 225 onts = 76 '/*boolean*/ 226 Public Const avpCurrCMM = 77 '/*char* */ 227 Public Const avpBrowserIntegration = 78 '/*boolean*/ 228 Public Const avpPrintAnnots = 79 '/*boolean */ 229 Public Const avpSendFarEastFonts = 80 '/*boolean */ 230 Public Const avpSuppressCSA = 81 '/*boolean */ 231 '* AVZoomType -- Variable zoom "verbs", 232 ' corresponding to View menu items *' 233 ' no variable zoom - use this for XYZ zoom 234 Public Const AVZoomNoVary = 0 235 ' fit page to window 236 Public Const AVZoomFitPage = 1 237 ' fit page width to window 238 Public Const AVZoomFitWidth = 2 239 ' fit page height to window 240 Public Const AVZoomFitHeight = 3 241 ' fit visible width to window 242 Public Const AVZoomFitVisibleWidth = 4 243 '/* use page's preferred zoom */ 244 Public Const AVZoomPreferred = 5 245 ' Open the document with tool bar visible 246 Public Const AV_EXTERNAL_VIEW = 1 247 ' Draw the page pane and scrollbars 248 Public Const AV_DOC_VIEW = 2 249 ' Draw only the page pane 250 Public Const AV_PAGE_VIEW = 4 251 '****************** PD Things ***********************' 252 '* PDPageMode -- Variable for how the file opens 253 ' - bookmarks, thumbnails, full screen, none *' 254 'Leave the view mode as it is. 255 Public Const PDDontCare = 0 256 'Display the document, but neither bookmarks nor 257 ' thumbnail images. 258 Public Const PDUseNone = 1 259 'Display the document and thumbnail images. 260 Public Const PDUseThumbs = 2 261 'Display the document and bookmarks. 262 Public Const PDUseBookmarks = 3 263 'Display the document in full screen mode. 264 Public Const PDFullScreen = 4 265 '* PDLayoutMode -- Variable for how the file is opened 266 ' - single page, one column, two column *' 267 Public Const PDLayoutDontCare = 0 268 Public Const PDLayoutSinglePage = 1 269 Public Const PDLayoutOneColumn = 2 270 Public Const PDLayoutTwoColumnLeft = 3 271 Public Const PDLayoutTwoColumnRight = 4 272 '* PDDocFlags -- used for Getting or 273 ' Setting the flags of a PD doc *' 274 '/* document has been modified and needs saving (get/set) */ 275 Public Const PDDocNeedsSave = &H1 276 '/* document cannot be saved incrementally; must 277 ' be written with PDSaveFull. (get/set) */ 278 Public Const PDDocRequiresFullSave = &H2 279 '/* document has been modified internally, such as 280 'opening/closing bookmarks and annotations, but 281 'not in such a way as to warrant saving. 282 '(get only)*/ 283 Public Const PDDocIsModified = &H4 284 '/* document is based on a temporary file which must 285 'be deleted when the document is closed or saved. 286 '(get/set)*/ 287 Public Const PDDocDeleteOnClose = &H8 288 '/* document was repaired when opened (get only) */ 289 Public Const PDDocWasRepaired = &H10 290 '/* document major version newer than 291 current (get only) */ 292 Public Const PDDocNewMajorVersion = &H20 293 '/* document minor version newer than current (get only) */ 294 Public Const PDDocNewMinorVersion = &H40 295 '/* document version older than current (get only) */ 296 Public Const PDDocOldVersion = &H80 297 '/* don't display errors (get/set) */ 298 Public Const PDDocSuppressErrors = &H100 299 '/* document is embedded in a compound doc (OLE, OpenDoc) */ 300 Public Const PDDocIsEmbedded = &H200 301 '/* document is linearized (get only) */ 302 Public Const PDDocIsLinearized = &H400 303 '/* document is optimized */ 304 Public Const PDDocIsOptimized = &H800 305 '* PDInsertFlags -- used for inserting pages *' 306 '' insert bookmarks as well as pages 307 Public Const PDInsertBookmarks = &H1 308 '' insert all Catalog and Info dict values as well as pages 309 Public Const PDInsertAll = &H1000 310 '/* insert articles as well */ 311 Public Const PDInsertThreads = &H2 312 '* Page specification defines -- use where a page number 313 ' or range or count is required *' 314 Public Const PDBeforeFirstPage = -1 ' 315 Public Const PDLastPage = -2 ' 316 Public Const PDAllPages = -3 ' 317 Public Const PDOddPagesOnly = -4 ' 318 Public Const PDEvenPagesOnly = -5 ' 319 '* PDSaveFlags -- used for PD-level Save 320 '* All undefined flags should be set to zero. 321 '* If either PDSaveCollectGarbage or PDSaveCopy 322 ' are used, PDSaveFull must be used. 323 ' write changes only 324 '(変更だけを書いてください) 325 Public Const PDSaveIncremental = &H0 326 ' write entire file 327 '(ファイル全体を書いてください) 328 Public Const PDSaveFull = &H1 329 'write copy w'o affecting current state 330 '(現状に影響するコピーw'oに書いてください) 331 Public Const PDSaveCopy = &H2 332 ' writes the file linearized for page-served 333 ' remote (net) access. 334 '(ページで役立たれたリモートな(ネットの)アクセサリーの 335 ' ためにlinearizedされたファイルを書きます。) 336 Public Const PDSaveLinearized = &H4 337 ' /* OK to store binary in file */ 338 '(ファイルを2進蓄えるために、OKです) 339 Public Const PDSaveBinaryOK = &H10 340 ' perform garbage collection on unreferenced objects '' 341 '(参照されない物にガーベージコレクションを実行してください) 342 Public Const PDSaveCollectGarbage = &H20 343 '* Enum for routines that set/get the value of a page's Rotate key. *' 344 Public Const pdRotate0 = 0 345 Public Const pdRotate90 = 90 346 Public Const pdRotate180 = 180 347 Public Const pdRotate270 = 270


 Highlight:プログラミング言語のソースコードを構文で色分け (GUI編)
 

< 戻る >

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

CAPTCHA



SAMURAI Plugin

コメントをする時は出来れば以下もお願いします。

  • OS名 バージョン
  • Acrobat バージョン
  • ツール(Excel等) バージョン
コメントにサンプルコードを入れる時はコードを全て全角文字列にしてください。コチラで半角に戻します。それでもエラーが回避できない時はコメント下さい。個別に対処します。



お仕事で当サイトを見ている方へ
考え込んだら、ご質問下さい。
一緒に解決策を考えましょう。

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください