2017-07-07 143 views
0

我得到一個PDF文件的流,我試圖將其添加到我當前的PDF中。如何使用PDFsharp將外部PDF添加到當前頁面?

 byte[] pdfBytes = interview.Application.CandidateResumeFile.File.FileBinary.ToArray(); 
     Stream pdfstream = new MemoryStream(imgBytes); 

這給了我想要添加到我的頁面的PDF文件的流。

 PdfDocument doc = new PdfDocument(); 
     doc.Info.Title = "Test PDFSharp"; 
     PdfPage page = doc.AddPage(); 
     XGraphics gfx = XGraphics.FromPdfPage(page); 

     ////////content 

     const string filename = "test.pdf"; 
     doc.Save(filename); 
     Process.Start(filename); 

這是我的頁面設置和頁面加載正常。我只想將PDF文件添加到頁面。

回答

相關問題