"Capture()ing" multiple pages

Recommended Posts


Having trouble using Page.Capture()..

When I test it with a single page, ie

Page.Capture("Main", "c:\test\capture.jpg")

it works fine. But when I use the comma-separated overlay notation like strCurrentPage would see, ie

Page.Capture("Main,Graph1", "c:\test\capture.jpg")

it writes a 0kb jpg. Any ideas? Should it be a different notation? I have tried initialising with

Page.strCurrentPage = "Main"


Page.strCurrentPage = "Graph1"


first, but that doesn't make a difference, nor does it seem whether I have the web server active or not.


Link to comment
Share on other sites

It does indeed. As detailed above, I tried the initialising thing, and I can successfully capture each page individually - either Page.Capture("Main","c:\test\capture.jpg") works, as does Page.Capture("Graph1","c:\test\capture.jpg"). I only run into trouble when I try:


Just confirming this is the correct syntax for capturing overlaid pages. Has anyone tried this themselves?

Link to comment
Share on other sites

Sorry, you did actually say you were initializing the pages.

No, that is not the correct syntax. Since Capture uses the same code as the web browser, it takes the same specifier and you should look at the web server section for a complete description. The comma is not a valid URL character, so you must use the + to combine pages:


There are other specifiers available to crop the pages too. I have tested this and it works.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.