0

Similar question:

convert windows form to pdf file

I am trying to print a Windows form to PDF in a similar manner as the above question, however the method described in that particular answer is essentially taking an image of the form. I have controls that use a scrollbar (e.g. tablelayoutpanel) and need to see all of the information within, rather than whatever selection the scrollbar happens to be on.

Is this possible?

Community
  • 1
  • 1
iajs
  • 167
  • 4
  • 14
  • It is possible because there is a screen capture called "DuckLink" that has the ability to screenshot an entire webpage (with scroll bar), This even has command line support so maybe could even use this – Sayse Jul 23 '13 at 08:53

1 Answers1

0

You will need to take a screen shot and use that image to generate a pdf.

The only way I have seen this done is using a program called Snagit, which scrolls the application window automatically whilst capturing it and I assume stitches that together.

I would imagine you would need to do that programatically to get the output you need?

Mark Redman
  • 24,079
  • 20
  • 92
  • 147
  • A quick search reveals: http://stackoverflow.com/questions/3883308/capture-a-scrolling-window-contents-screenshot – Mark Redman Jul 23 '13 at 08:55
  • Yes, the main problem is that a control on my form may have a scrollbar but further controls underneath it. I'd need the capture to essentially "drag" the scrollbar-using control until it no longer needed scrolling – iajs Jul 23 '13 at 09:21
  • 1
    Figuring that programatically will be tricky. What is the purpose of the screen grab to PDF, if this for reporting, I would suggest formatting a report a different format, ie generate a PDF, Excel, Html or other report using the data. – Mark Redman Jul 23 '13 at 09:43