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の説明一覧」も参照して下さい。

 


Option Explicit

'★ここの説明は一部以下のURLのPDFにあります。

'★http://ftp.ktug.or.kr/obsolete/

'       info/adobe/devtechnotes/pdffiles/5165.vwiacref.PDF

' ADOBE SYSTEMS INCORPORATED

' Copyright (C) 1994-2003 Adobe Systems Incorporated

' All rights reserved.

'

' NOTICE: Adobe permits you to use, modify, and distribute this file

' in accordance with the terms of the Adobe license agreement

' accompanying it. If you have received this file from a source other

' than Adobe, then your use, modification, or distribution of it

' requires the prior written permission of Adobe.

'

' ------------------------------------------------------------------

'

' iac.bas

'

' - This file contains enumerated data types and constants necessary

'   for some of the OLE method parameters. It is derived from the C

'   header file IAC.h

''**************** AV Things ******************* ''

'* AV Application Preferences data type *'

'(Read only) The preferences file format version number.

Public Const avpPrefsVersion = 0           ' Int32

'If true, the “file open” dialog is displayed when

' the Acrobat viewer is launched without a document to open.

' If false, it does not.

Public Const avpOpenDialogAtStartup = 1    ' boolean

'If true, the Acrobat viewer splash screen is shown

' when the Acrobat viewer is launched. If false, it is not.

Public Const avpShowSplashAtStartup = 2    ' boolean

'If true, the Acrobat viewer’s toolbar is displayed.

' If false, it is not. The toolbar can also be shown and

' hidden by the user.

Public Const avpShowToolBar = 3            ' boolean

'If true, the Acrobat viewer remembers the location of

' certain dialogs (such as the Find dialog) and displays

' them in their previous location. If false, they are

' displayed in a default location.

Public Const avpRememberDialogs = 4        ' boolean

'If true, the Acrobat viewer displays short menus.

' If false, it displays long menus.

Public Const avpShortMenus = 5             ' boolean

'Whether thumbnail images, bookmarks,

' or neither should be shown along with documents by default.

' Must be one of the following:

' PDUseNone . Document only.

' PDUseThumbs . Document plus thumbs.

' PDUseBookmarks . Document plus bookmarks.

' PDFullScreen . Full screen mode.

' PDUseNone       ドキュメント専用。

' PDUseThumbs     そのうえ、親指を記録してください。

' PDUseBookmarks  そのうえ、ブックマークを記録してください。

' PDFullScreen    Fullはモードを上映します。

Public Const avpDefaultOverviewType = 6    ' Int32

'Default magnification when a document is opened.

'ドキュメントであるときに、デフォルト倍率は開かれます。

Public Const avpDefaultZoomScale = 7       ' Fixed

'Default zoom type for a page view.

' Must be one of the values listed in Zoom strategies.

Public Const avpDefaultZoomType = 8        ' Int32]

'If true, the Acrobat viewer displays large images.

' If false, gray boxes are shown in place of large images,

' reducing rendering time for pages with large images.

Public Const avpShowLargeImages =&nbsp

;9        ' boolean

'If true, text smaller than avpGreekLevel is greeked

' (displayed as gray boxes). If false, all text is drawn,

' regardless of its size.

Public Const avpGreekText = 10             ' boolean

'Size, in points, below which text is greeked

' if avpGreekText is true.

Public Const avpGreekLevel = 11            ' Int32

'Determines whether sans serif, serif, or both substitution

' fonts are available when printing. Using only one

' substitution font type generally reduces the quality of

' font substitution, but may allow some files that require

' font substitution to print on PostScript printers that

' have very little memory. The allowed values are:

'0 . Use both sans serif and serif

'1 . Use sans serif only

'2. Use serif only

Public Const avpSubstituteFontType = 12    ' Int32

'If true, the Acrobat viewer renders using calibrated color.

Public Const avpDoCalibratedColor = 13     ' boolean

'If true, a warning dialog box is not displayed when

' a user deletes notes, bookmarks, links, pages, or

' thumbnails. If false, the dialog box is displayed.

Public Const avpSkipWarnings = 14          ' boolean

'The PostScript language level to use when printing

' to a PostScript printer. Allowed values are 1 and 2.

Public Const avpPSLevel = 15               ' Int32

'If true, pages are shrunk to fit the imageable area

' of the printer when printed. If false, pages are not

' shrunk to fit.

Public Const avpShrinkToFit = 16           ' boolean

'If true, the Acrobat viewer’s Find command

' (not the Search plug-in) performs case-sensitive searches.

' If false, searches are not case-sensitive.

Public Const avpCaseSensitive = 17         ' boolean

'If true, the Acrobat viewer's Find command

' (not the Search plug-in) matches only whole words.

' If false, the partial words are also matched.

Public Const avpWholeWords = 18            ' boolean

'Default color to use for new notes.

Public Const avpNoteColor = 19             ' PDColorValue

'Default label to use for new notes.

Public Const avpNoteLabel = 20             ' char

'The maximum zoom factor that is automatically used when

' the Acrobat viewer enters “Follow Article” mode.

' A value of 1.0 corresponds to a zoom factor of 100%.

Public Const avpMaxThreadZoom = 21         ' Fixed

'If true, the following page is rendered offscreen while

' the current page is viewed, improving performance when

' a document is viewed sequentially. If false, no draw-ahead

' is used.

Public Const avpEnablePageCache = 22       ' boolean

'The background color to use when the Acrobat viewer

' is in Full Screen mode.

Public Const avpFullScreenColor = 23       ' PDColorValue

Public Const avpUnused1 = 24   &nbsp

;           ' obsolete

'Maximum zoom factor at which pages will be cached.

' Pages viewed at a higher zoom factor will not cached.

' A value of 1.0 corresponds to a zoom factor of 100%.

' Fixed: pages whose zoom > this will not be cached

Public Const avpMaxPageCacheZoom = 25

'The minimum number of ticks needed to redraw a page before

' it will be cached. Pages that can be redrawn in less time

' will not be cached. A tick is 1/60 of a second.

'Int32: pages which take < this to render will not be cached

Public Const avpMinPageCacheTicks = 26

'The maximum number of bytes the page cache is allowed to occupy.

'Int32: overall constraint on storage used by cache

Public Const avpMaxPageCacheBytes = 27

Public Const avpUnused2 = 28               ' obsolete

'Time (in seconds) to show each page when using

' automatic page changing in full screen mode.

Public Const avpFullScreenChangeTimeDelay = 29 ' Int32

'If true, the document’s pages are displayed in a loop

' (rather than just once) when using full screen mode.

' If false, they are not.

Public Const avpFullScreenLoop = 30        ' boolean

'The scale at which thumbnail images are created.

' The Acrobat viewer’s default is fixedEighth,

' creating thumbnail images whose linear dimensions

' are oneeighth those of the actual page.

Public Const avpThumbViewScale = 31        ' Fixed

Public Const avpThumbViewTimeout = 32      ' Int32

'Default destination fit type for creating

' links and bookmarks.

Public Const avpDestFitType = 33           ' char

'If true, the default for creating new links and

' bookmarks is “Inherit zoom”

Public Const avpDestZoomInherit = 34       ' boolean

'Int32 (Used on Macintosh only)

'Specifies the way in which highlighted text is to be

' displayed. Can have one of the following values:

' #define HIGHLIGHT_PAINT_XOR 0 .

'   Paint highlight color in XOR mode

' #define HIGHLIGHT_INVERT_MAC 1 .

'   Invert in special Macintosh highlight

' Mode

' #define HIGHLIGHT_INVERT_XOR 2 .

'   Invert in XOR mode

' This preference exists because the standard Macintosh

' highlighting generally works quite well, but can

' occasionally become invisible when text is on a

' colored background.

Public Const avpHighlightMode = 35         ' Int32

'The default width (in pixels) of the portion of

' the document window in which bookmarks and thumbnail

' images are displayed. The actual width can be changed

' by the user.

Public Const avpDefaultSplitterPos = 36    ' Int32

Public Const avpUnused3 = 37               ' obsolete

' Int32: max # of bytes of Cos object cache per Cos doc.

Public Const avpMaxCosDocCache = 38

Public Const avpPageUnits = 39             >' PageUnits





Public Const avpNoteFontName = 40          ' char*

Public Const avpNoteFontSize = 41          ' Int32

Public Const avpRecentFile1 = 42           ' char *

Public Const avpRecentFile2 = 43           ' char *

Public Const avpRecentFile3 = 44           ' char *

Public Const avpRecentFile4 = 45           ' char *

Public Const avpHighlightColor = 46        ' PDColorValue

Public Const avpFullScreenUseTimer = 47    ' boolean

Public Const avpAntialiasText = 48         ' boolean

Public Const avpAntialiasLevel = 49        ' Int16

Public Const avpPersistentCacheSize = 50   ' Int32

Public Const avpPersistentCacheFolder = 51 ' ASPathName

Public Const avpPageViewLayoutMode = 52    ' PDLayoutMode

Public Const avpSaveAsLinearized = 53      ' boolean

Public Const avpMaxOpenDocuments = 54      ' Int32

Public Const avpTextSelectWordOrder = 55   ' Int32

Public Const avpMarkHiddenPages = 56       ' boolean

Public Const avpFullScreenTransitionType = 57 ' char*

Public Const avpFullScreenClick = 58       ' boolean

Public Const avpFullScreenEscape = 59      ' boolean

Public Const avpFullScreenCursor = 60      ' Int16

Public Const avpOpenInPlace = 61           ' boolean

Public Const avpShowHiddenAnnots = 62      ' boolean

Public Const avpFullScreenUsePageTiming = 63  ' boolean

Public Const avpDownloadEntireFile = 64    ' boolean

Public Const avpEmitHalftones = 65         ' boolean

Public Const avpShowMenuBar = 66            ' /*boolean*/

Public Const avpIgnorePageClip = 67         '/*boolean*/

Public Const avpMinimizeBookmarks = 68    '/* boolean*/

Public Const avpShowAnnotSequence = 69      '/*boolean*/

Public Const avpUseLogicalPageNumbers = 70  '/*boolean*/

'/*###cannot use via IAC*/

Public Const avpASExtensionDigCert = 71

Public Const avpShowLeftToolBar = 72        '/*boolean*/

Public Const avpConfirmOpenFile = 73        '/*boolean*/

'/*cannot use via IAC*/

Public Const avpNoteLabelEncoding = 74

Public Const avpBookmarkShowLocation = 75   '/*boolean*/

Public Const avpUseLocalF

onts = 76          '/*boolean*/

Public Const avpCurrCMM = 77                '/*char* */

Public Const avpBrowserIntegration = 78     '/*boolean*/

Public Const avpPrintAnnots = 79            '/*boolean */

Public Const avpSendFarEastFonts = 80       '/*boolean */

Public Const avpSuppressCSA = 81            '/*boolean */

'* AVZoomType -- Variable zoom "verbs",

'  corresponding to View menu items *'

' no variable zoom - use this for XYZ zoom

Public Const AVZoomNoVary = 0

' fit page to window

Public Const AVZoomFitPage = 1

' fit page width to window

Public Const AVZoomFitWidth = 2

' fit page height to window

Public Const AVZoomFitHeight = 3

' fit visible width to window

Public Const AVZoomFitVisibleWidth = 4

'/* use page's preferred zoom */

Public Const AVZoomPreferred = 5

' Open the document with tool bar visible

Public Const AV_EXTERNAL_VIEW = 1

' Draw the page pane and scrollbars

Public Const AV_DOC_VIEW = 2

' Draw only the page pane

Public Const AV_PAGE_VIEW = 4

'****************** PD Things ***********************'

'* PDPageMode -- Variable for how the file opens

'  - bookmarks, thumbnails, full screen, none *'

'Leave the view mode as it is.

Public Const PDDontCare = 0

'Display the document, but neither bookmarks nor

' thumbnail images.

Public Const PDUseNone = 1

'Display the document and thumbnail images.

Public Const PDUseThumbs = 2

'Display the document and bookmarks.

Public Const PDUseBookmarks = 3

'Display the document in full screen mode.

Public Const PDFullScreen = 4

'* PDLayoutMode -- Variable for how the file is opened

'  - single page, one column, two column *'

Public Const PDLayoutDontCare = 0

Public Const PDLayoutSinglePage = 1

Public Const PDLayoutOneColumn = 2

Public Const PDLayoutTwoColumnLeft = 3

Public Const PDLayoutTwoColumnRight = 4

'* PDDocFlags -- used for Getting or

'  Setting the flags of a PD doc *'

'/* document has been modified and needs saving (get/set) */

Public Const PDDocNeedsSave = &H1

'/* document cannot be saved incrementally; must

' be written with PDSaveFull. (get/set) */

Public Const PDDocRequiresFullSave = &H2

'/* document has been modified internally, such as

'opening/closing bookmarks and annotations, but

'not in such a way as to warrant saving.

'(get only)*/

Public Const PDDocIsModified = &H4

'/* document is based on a temporary file which must

'be deleted when the document is closed or saved.

'(get/set)*/

Public Const PDDocDeleteOnClose = &H8

'/* document was repaired when opened (get only) */

Public Const PDDocWasRepaired = &H10

'/* document major version newer than

current (get only) */

Public Const PDDocNewMajorVersion = &H20

'/* document minor version newer than current (get only) */

Public Const PDDocNewMinorVersion = &H40

'/* document version older than current (get only) */

Public Const PDDocOldVersion = &H80

'/* don't display errors (get/set) */

Public Const PDDocSuppressErrors = &H100

'/* document is embedded in a compound doc (OLE, OpenDoc) */

Public Const PDDocIsEmbedded = &H200

'/* document is linearized (get only) */

Public Const PDDocIsLinearized = &H400

'/* document is optimized */

Public Const PDDocIsOptimized = &H800

'* PDInsertFlags -- used for inserting pages *'

'' insert bookmarks as well as pages

Public Const PDInsertBookmarks = &H1

'' insert all Catalog and Info dict values as well as pages

Public Const PDInsertAll = &H1000

'/* insert articles as well */

Public Const PDInsertThreads = &H2

'* Page specification defines -- use where a page number

'  or range or count is required *'

Public Const PDBeforeFirstPage = -1 '

Public Const PDLastPage = -2      '

Public Const PDAllPages = -3 '

Public Const PDOddPagesOnly = -4 '

Public Const PDEvenPagesOnly = -5 '

'* PDSaveFlags -- used for PD-level Save

'* All undefined flags should be set to zero.

'* If either PDSaveCollectGarbage or PDSaveCopy

'  are used, PDSaveFull must be used.

' write changes only

'(変更だけを書いてください)

Public Const PDSaveIncremental = &H0

' write entire file

'(ファイル全体を書いてください)

Public Const PDSaveFull = &H1

'write copy w'o affecting current state

'(現状に影響するコピーw'oに書いてください)

Public Const PDSaveCopy = &H2

' writes the file linearized for page-served

' remote (net) access.

'(ページで役立たれたリモートな(ネットの)アクセサリーの

' ためにlinearizedされたファイルを書きます。)

Public Const PDSaveLinearized = &H4

' /* OK to store binary in file */

'(ファイルを2進蓄えるために、OKです)

Public Const PDSaveBinaryOK = &H10

' perform garbage collection on unreferenced objects ''

'(参照されない物にガーベージコレクションを実行してください)

Public Const PDSaveCollectGarbage = &H20

'* Enum for routines that set/get the value of a page's Rotate key. *'

Public Const pdRotate0 = 0

Public Const pdRotate90 = 90

Public Const pdRotate180 = 180

Public Const pdRotate270 = 270

 

< 戻る >

コメントを残す

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

CAPTCHA


出来るだけ早く返答する様には心がけています。
が、遅くなる時もありますのでご了承ください。


SAMURAI Plugin

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

  • OS名 バージョン
  • Acrobat バージョン
  • ツール(Excel等) バージョン
コメントにサンプルコードを入れるとエラーになる場合が有ります。その時はコードの前後に <code> ・・・</code> タグを入れてください。

This site uses Akismet to reduce spam. Learn how your comment data is processed.