‚½‚ι‚«‚Ώ‚Μ‚ ‚κ‚±‚κ









@ Top ▶ ƒvƒƒOƒ‰ƒ~ƒ“ƒOƒTƒ“ƒvƒ‹ ▶ ‚o‚c‚eƒtƒ@ƒCƒ‹Œ‹‡

papy—lμ‚́updftool.dllv‚πŽg—p‚³‚Ή‚Δ‚’‚½‚Ύ‚«‚ά‚·B
updftool.dllv‚πŽΐsƒtƒ@ƒCƒ‹‚Ζ“―‚ΆƒtƒHƒ‹ƒ_‚Ι’u‚’‚č쐬‚΅‚ά‚·B


‚o‚c‚eƒtƒ@ƒCƒ‹Œ‹‡‚ΜƒTƒ“ƒvƒ‹‚Ε‚·B

‚b”

// using System.IO;
// using System.Runtime.InteropServices;

[DllImport("pdftool.dll")]
private static extern IntPtr LoadPDF(string OpenFileName);
[DllImport("pdftool.dll")]
private static extern bool FreePDF(IntPtr pdf);
[DllImport("pdftool.dll")]
private static extern int CombinePDFEx(string PDFfilelistName_txt, string CombinedFileName, IntPtr Form_Handle, bool UseOutLine);

string PdfListFile = Application.StartupPath + "\\PdfList.txt";
using (StreamWriter sw = new StreamWriter(PdfListFile, false, Encoding.GetEncoding("Shift_JIS")))
{
    string str = @"C:\sample1.pdf";
    IntPtr hPDF = LoadPDF(str);
    if ((int)hPDF > -1) sw.WriteLine(str);
    FreePDF(hPDF);
    str = @"C:\sample2.pdf";
    hPDF = LoadPDF(str);
    if ((int)hPDF > -1) sw.WriteLine(str);
    FreePDF(hPDF);
}

CombinePDFEx(PdfListFile, @"C:\sample3.pdf", this.Handle, false);



@