hooking up old windows GDI print solution to insert a pdf the dynamic pdf way.

hooking up old windows GDI print solution to insert a pdf the dynamic pdf way.

Forum member · Apr 14, 2021
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?

Re: hooking up old windows GDI print solution to insert a pdf the dynamic pdf way.

Support · Apr 15, 2021
Hi, We currently don't expose a way to write to an existing GDI stream, but this is functionality we could easily add to our DynamicPDF Rasterizer product. Please send an email to our support team at [^a|mailto:support@dynamicpdf.com|opennewwindow|support@dynamicpdf.com^] so we can coordinate adding this feature and getting you a build to test. Thanks, ceTe Software Support Team