jwolfe Posted February 21, 2012 Share Posted February 21, 2012 I use DAQ Factory's Page.Capture function to create a jpeg image of my main page which is uploaded to a web site to display information every few minutes. The jpeg image size appears fine on my work computer (~ 8" x 11") but when viewing it from other computers, the size is, sometimes, reduced. Not sure what Link to comment Share on other sites More sharing options...
AzeoTech Posted February 22, 2012 Share Posted February 22, 2012 Most browsers will scale an image if you browse directly to that image and its too big for your screen: www.myURL.com/myImage.jpg To avoid this, create an HTML file that references the image instead. So, for example, if myImage.jpg was 2000x2000 pixels, you might make your HTML file: <html> </html> <body> <img src = "/myImage.jpg" style = "width: 2000px; height: 2000px;"/> </body> Then browse to that file instead of the image directly. Link to comment Share on other sites More sharing options...
BeeHay Posted March 12, 2012 Share Posted March 12, 2012 There is now this option jwolfe - Page.Capture("Page2","C:\Page2.jpg", 800, 600) Sorry to thread jack, but I need some pointers once again from the Guru!! I posted in another thread about a huge page cap (tryin 1680 x 3000+) and it lags out DF...(like you said ) It does do "some" of the screenshot, but usually about halfway down is all blacked out...(don't think it is clipping it off) Can you give me some insight on the printPDF function you were talking about?? Also, is there a "master" function list?? Didn't see something like that in the help file. Any info is great! Link to comment Share on other sites More sharing options...
AzeoTech Posted March 12, 2012 Share Posted March 12, 2012 The issue jwolfe is having is with scaling, and applying a size in page.capture of 800,600 will simply crop the image to 800x600, which still might be scaled if the browser window is small, so good idea, but really you have to use the html method. The problem with huge screenshots is that it takes huge memory. 1680x3000 is 20 meg just for the bitmap, all that has to be manipulated in memory (vs screen memory). As for printPDF, there are other forums around with details, but basically its printPDF(pageNames, filename, xres, yres). It does not support all screen components, but does support things like text, tables, and graphs, which makes it useful for reports. It is not documented because its basically a feature that was never completed and isn't polished, kind of like the OOP stuff. It works fine as long as you understand the limitations. Link to comment Share on other sites More sharing options...
BeeHay Posted March 12, 2012 Share Posted March 12, 2012 I was just thinking if jwolfe wanted to know what his capture size is, he could set it and know for sure. Hmm, here trying the printPDF function and am having strange results... I have tried - Page.printPDF("MyPage","C:\MyPage.pdf", 1680, 1050) and Page.printPDF("MyPage","C:\MyPage.jpg", 1680, 1050) The function definitely seems to spit out the result alot faster, but both my end result files are either blank (pdf), or non open-able (jpg)... Just trying to get a "full well" graph displayed for our next set of jobs coming up, would be nice to see a full "history" quickly instead of graphing the data in our plotting program and to score brownie points with this new operator. Link to comment Share on other sites More sharing options...
AzeoTech Posted March 12, 2012 Share Posted March 12, 2012 That's true, or you can simply view the properties of the generated image from Windows Explorer (or the browser). As for printpdf, you certainly don't want to make it .jpg since its a pdf. The problem is probably your scaling. Try 10,10. Link to comment Share on other sites More sharing options...
BeeHay Posted March 12, 2012 Share Posted March 12, 2012 Thanks much...I'll give it a shot when I get home... Link to comment Share on other sites More sharing options...
BeeHay Posted March 13, 2012 Share Posted March 13, 2012 Page.PrintPDF("MyPage", "C:\MyPage.pdf", 10, 30) works great... Thanks much... Link to comment Share on other sites More sharing options...
aceav8or Posted May 2, 2012 Share Posted May 2, 2012 On that note, if you're running a quick sequence for this is there a way to make sure that it prints a new pdf each time instead of writing over the last one? Link to comment Share on other sites More sharing options...
AzeoTech Posted May 2, 2012 Share Posted May 2, 2012 Sure, just give it a different name. Using a timestamp is easiest: Page.PrintPDF("MyPage", "C:\MyPage_" + formatdateTime("%y%m%d_%H%M",systime()) + ".pdf", 10, 30) Link to comment Share on other sites More sharing options...
aceav8or Posted May 2, 2012 Share Posted May 2, 2012 Brilliant, as always. Thanks! Azeotech support ROCKS! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.