Hi Umer,
Thanks for your inquiry.
Umer Javed: 1- We have a requirement where we need to download existing word/pdf documents from URLs on the netowrk and then convert them into 1 PDF output. I can download bytes array from the Urls into individual Memory stream though!
Can i please have an example which could demostrate above?
Please check following code snippet and documenation link for concatenating PDF documents. hopefully it will help you to accomplish your requirements.
FileStream fileStream1
= new FileStream(myDir
+ "TableDom.pdf", FileMode.Open, FileAccess.Read);
byte[] tmpBytes1
= new byte[fileStream1.Length];
fileStream1.Read(tmpBytes1, 0,
Convert.ToInt32(fileStream1.Length));
MemoryStream memoryStream1
= new MemoryStream(tmpBytes1);
FileStream fileStream2
= new FileStream(myDir
+ "example2.pdf", FileMode.Open, FileAccess.Read);
byte[] tmpBytes2
= new byte[fileStream2.Length];
fileStream2.Read(tmpBytes2, 0,
Convert.ToInt32(fileStream2.Length));
MemoryStream memoryStream2 = new MemoryStream(tmpBytes2);
Document pdfDocument1
= new Document(memoryStream1);
Document pdfDocument2
= new Document(memoryStream2);
pdfDocument1.Pages.Add(pdfDocument2.Pages);
pdfDocument1.Save(memoryStreamout);
Umer Javed: 2- The PDF output from 1 needs to be printed on user's local printer. If the above application is running on a server here in UK and the final PDF output needs to be printed by a remote client(user of the application and triggering through a web interface button) in different part of world, how can the ouput be printed on user's local printer? the only information server contains regarding the user is its printer address(e.g. "HP 1050 " or \\HongKong\Priner) in a business object.
Please check documentation link how to set printer name while printing using PdfViewer. Hopefully it will serve the purpose. Moreover, please note if you you are trying to print from a web application to client printer then I'm afraid its not supported, please consider this post.
Please feel free to contact us for any further assistance.
Best Regards,