AddNote 繝。繧ス繝・ラ

繝弱・繝医rPDF繝輔ぃ繧、繝ォ縺ォ霑ス蜉縺吶k縲・

Sub AddNote(From As Long,
            To As Long,
            Left As Double,
            Top As Double,
            Text As String,
            Author As String,
            Subject As String,
            Icon As prcNoteIcon,
            Color As OLE_COLOR,
            Opened As Boolean)

繝代Λ繝。繝シ繧ソ

謌サ繧雁€、

縺ェ縺・/P>

豕ィ諢冗せ

蛯呵€・1: 蠎ァ讓吶す繧ケ繝・Β諠・ア:

  1. PDF 繝ヲ繝シ繧カ繝シ繧ケ繝壹・繧ケ縺ョ繝ヲ繝九ャ繝医し繧、繧コ縺ッ 1/72 繧、繝ウ繝・(1 inch = 72 PDF 繝ヲ繝シ繧カ繝シ繧ケ繝壹・繧ケ繝ヲ繝九ャ繝・縺ァ縺吶€・
  2. 蜴溽せ(0, 0) 縺ョ繝ュ繧ア繝シ繧キ繝ァ繝ウ縺ッ蟾ヲ荳企嚆縺ァ縺吶€・
  3. PDF 繝輔ぃ繧、繝ォ縺九i繝壹・繧ク繧オ繧、繧コ繧貞叙蠕励☆繧九↓縺ッ縲・A href="M_GetPageSize.htm">GetPageSize 繝。繧ス繝・ラ繧剃スソ逕ィ縺励※縺上□縺輔>縲・br>

    繝壹・繧ク逡ェ蜿キ縺ッ繧シ繝ュ-繝吶・繧ケ縺ョ繧、繝ウ繝・ャ繧ッ繧ケ繧剃スソ逕ィ縺励∪縺吶€ゅ▽縺セ繧翫€√・繝シ繧ク逡ェ蜿キ縺ッ0 縺九i蟋九∪繧翫∪縺吶€・

蛯呵€・2: 蜷・ィョ繝励Ο繧ー繝ゥ繝溘Φ繧ー險€隱槭°繧峨・OLE_COLOR 螟画鋤:

C++:

static_cast<OLE_COLOR>(RGB(0, 0, 255))

VB6:

RGB(0, 0, 255)

VB.NET:

Convert.ToUInt32(System.Drawing.ColorTranslator.ToOle(Color.FromArgb(0, 0, 255))

C#:

(uint)System.Drawing.ColorTranslator.ToOle(Color.FromArgb(0, 0, 255))

Others:

莉・荳九・繝輔か繝シ繝槭ャ繝医〒縺ョ32 bit 謨エ謨ー蛟、: 0x00bbggrr (BGR 繝輔か繝シ繝槭ャ繝亥・, RGB蜀・〒縺ッ縺ェ縺・


濶イ螟画鋤縺ォ髢「縺励※縺ョ隧ウ邏ー縺ッMSDN Knowledge Base article Q131101 繧貞盾辣ァ縺励※縺上□縺輔>縲・

VBScript 縺ォ縺翫¢繧倶スソ逕ィ萓・/H2>

Set oProcessor = CreateObject("easyPDF.PDFProcessor.7")
Set oProcessorHandle = oProcessor.OpenFile("C:\input.pdf", "C:\output.pdf")

oProcessorHandle.AddNote 0, _
                         0, _
                         100, _
                         80, _
                         "Note text here." + vbCR + vbCR + "Line break with CR is allowed", _
                         "Author", _
                         "Subject", _
                         PRC_NOTEICON_NOTE,
                         RGB(255, 255, 0),
                         False
oProcessorHandle.Close

VB.NET 縺ォ縺翫¢繧倶スソ逕ィ萓・/h2>

Dim oProcessor As PDFProcessor = New PDFProcessor


Dim oProcessorHandle As PDFProcessorHandle = oProcessor.OpenFile("C:\input.pdf", "C:\output.pdf")
   oProcessorHandle.AddNote(0, _
                            0, _
                            100, _
                            80, _
                            "Note text here." + vbCR + vbCR + "Line break with CR is allowed", _
                            "Author", _
                            "Subject", _
                            prcNoteIcon.PRC_NOTEICON_NOTE, _
                            Convert.ToUInt32(System.Drawing.ColorTranslator.ToOle(Color.FromArgb(255, 255, 0))), _
                            False)
oProcessorHandle.Close

C#縺ォ縺翫¢繧倶スソ逕ィ萓・/h2>

PDFProcessor oProcessor = new PDFProcessor();
PDFProcessorHandle oProcessorHandle = oProcessor.OpenFile(@"C:\input.pdf", @"C:\output.pdf", null);
   oProcessorHandle.AddNote(0,
                            0, 
                            100, 
                            80, 
                            "Note text here.\r\rLine break is allowed", 
                            "Author", 
                            "Subject", 
                            prcNoteIcon.PRC_NOTEICON_NOTE, 
                            (uint)System.Drawing.ColorTranslator.ToOle(Color.FromArgb(255, 255, 0)), 
                            false);
oProcessorHandle.Close();