I am attempting to use Dynamic PDF to merge a pdf into a existing windows GDI style print engine. We have a language we developed to do this. The program outputs to the selected printer. I need to know if you have any way to insert a pdf into that stream. I was using PDFtron and we are moving towards your solution, but I need to retrofit our old code with yours so we can get beyond dot net 3.5. (our pdftron version is pretty old). the document I am trying to merge into as already been generated as a printer type document. I just need to insert the pdf into the stream:
pdfDocument = new PDFDoc(pdfsDirectory + myFileName);
int dougsPageCount = pdfDocument.GetPageCount();//GENERAL.PDFPAGECOUNT
AddDictionaryItem("GENERAL", "PDFPAGECOUNT", dougsPageCount.ToString());
pageitr = pdfDocument.GetPageIterator();
pdfdraw = new PDFDraw();
pdfdraw.SetRasterizerType(PDFRasterizer.Type.e_GDIPlus);
the old routine would then add in any additional pages that might be in the PDF.
the new code that works great in our pdf only version looks like this:
ceTe.DynamicPDF.Merger.MergeDocument in_doc = new ceTe.DynamicPDF.Merger.MergeDocument(myFileName);
AddDictionaryItem("GENERAL", "PDFPAGECOUNT", in_doc.Pages.ToString());
// this is the new way. need to merge this into the oldway...
foreach (ceTe.DynamicPDF.Page pg in in_doc.Pages)
ceTe.DynamicPDF.PageList.Add(pg);
Which part of your solution can I use to write out to the existing stream of GDI commands?