2009-06-20 3 views

답변

4

iText 라이브러리의 C# 포트를 사용할 수 있습니다. 그것은 iTextSharp라고합니다.

http://itextsharp.com/

코드가 같이 있었던 것의 예 :

// create an output file stream which will be used to capture the generated file 
    string outputFileName = "output.pdf"; 
    FileStream outputFile = new FileStream(outputFileName, FileMode.Create); 

    // open the original pdf file as a PdfReader 
    PdfReader reader = new PdfReader("inputfile.pdf"); 

    // open the output pdf file as a PdfStamper 
    PdfStamper stamper = new PdfStamper(reader, outputFile); 

    // inserts a blank page at the start of the document 
    stamper.InsertPage(1, PageSize.A4); 

    // add the flash file to the output document as an annotation 
    PdfFileSpecification fs = PdfFileSpecification.FileEmbedded(stamper.Writer, flashFileTextBox.Text, flashFileTextBox.Text, null); 
    PdfAnnotation flashInsert = PdfAnnotation.CreateScreen(stamper.Writer, new Rectangle(50f,791f,545f,420f),"Flash Insert",fs, "application/x-shockwave-flash", true); 

    stamper.AddAnnotation(flashInsert,1); 

    stamper.Close(); 
    reader.Close(); 
1

SWF 파일을 프로그래밍 방식으로 PDF 문서에 삽입 할 수 있습니다. webSupergoo에서 PDF 라이브러리를보십시오. 설명서에는 C# 및 VB.NET의 예제가 포함되어 있습니다.

관련 문제