Open File Dialog + printing specific page of PDF

Not sure if anyone here has done something similar, but I’m looking into implementing an open file dialog allowing user to choose a PDF. These PDFs are comprised of multiple pages. I’d like the user to be able to choose a page of that PDF and have the program copy that page to a new file and place it somewhere.
I’ve looked into parsing the PDF data and printing that page, but it looks like this is pretty reliant on third party libraries like PDFSharp or iTextSharp, which I’m trying to avoid.
Anybody do something similar within Epicor?

I’ve done it with PDFSharp and iTextSharp but you do need those libraries. Nothing native in Epicor or .NET for PDF Processing. It does work well though

Thanks, I’ll look into doing it that way. Too bad there isn’t native .NET support for this!!

1 Like

Using iTextSharp, I can read the document text to string, but it’s all encoded looking text, did you get similar results?
I’m sure it’s PDF dependent, but still…

In ITextSharp, you need to use the PDF object model they created to copy a page.

Another option is just to open it with your regular PDF reader, and choose Print (Current Page) and have the printer be the PDF printer and it will prompt for a location to save that page. A little more education for the user but it works it other situations like when you cannot save a PDF.

Mark W.