NickB Posted January 22, 2023 Share Posted January 22, 2023 I am not able to print any longer. I am only able to get a blank page. the print preview shows the page and looks good but it will not print, both PDF and hard copy printer. Quote Link to comment Share on other sites More sharing options...
AzeoTech Posted January 23, 2023 Share Posted January 23, 2023 Try creating a very simple page, maybe just a Text component and see if it prints. Quote Link to comment Share on other sites More sharing options...
Andreas Posted March 3, 2023 Share Posted March 3, 2023 I have the same or at least closely related problem (Version 19.1, Windows 10). I cannot say if previous versions had this issue as I have not used printing feature previously. More Detail: I tried printing a big, complex page of an exisiting Project. In the preview there is already a blank page. Zooming in and out does not change that. when I print from the preview page, I receive a blank result. Interesting note: when exiting the preview, in the Live DAQFactory view the page content becomes blank as well. I have to switch pages back and forth for it to become visible again. When I print directly, without preview, I receive an almost blank page: there is a very small, empty dropdown (Combo Box) component in the top left corner. I created a new document with just two components: a print-button and a plain text. In the preview, there is at first only the button visible. When I zoom in once, the text also becomes visible. When I zoom in again (maximum zoom), the text vanishes again. Either way, the actual print remains blank - also when I print directly. I added a Combo Box. Then I have the identical behaviour as with the big project: When I print directly, there is a small combo box in the top left corner. I also tried adding a 2D-Graph: in the preview, the Axis labeling becomes all messed up around the place. There appears to be something seriously broken. Quote Link to comment Share on other sites More sharing options...
AzeoTech Posted March 3, 2023 Share Posted March 3, 2023 Yes, using File-Print has been an issue and really it probably should just be removed as an option until it works reliably. I generally recommend folks either use page.printpdf() to generate a PDF of the page, or page.capture(), and then if you really want it to go to the printer, do system.shellExecute() on the file you created with one of those two functions. Note that printPDF() does not work with all controls. It is mostly designed for text and the 2D graph for generating reports. It does not support bitmaps (i.e. most logos). Quote Link to comment Share on other sites More sharing options...
Andreas Posted March 6, 2023 Share Posted March 6, 2023 Thanks for the response. Unfortunately page.capture() only works with Pro and Developer licence. I also could not find any documentation about page.printpdf(). It is also not part of the command suggestions (see picture). When I try to use it anyway, nothing happens. Not even an error occurs. I also tried putting some parameters with no effect. Quote Link to comment Share on other sites More sharing options...
AzeoTech Posted March 6, 2023 Share Posted March 6, 2023 PrintPDF() is not documented because it doesn't print all components. If you search for it on this forum you will find quite a bit of info. The general form is: printpdf("pagename", "c:\myfile.pdf", 11, 8.5) where 11 is the page width and 8.5 the height. Quote Link to comment Share on other sites More sharing options...
Andreas Posted March 8, 2023 Share Posted March 8, 2023 Thanks for the clarification. The dimensions as parameters (in inch!) are vital. Without a correct width and height, the command does nothing. I noticed LED-indicators do not print and Combo-boxes disapear and become a black box in the top left corner. Otherwise it seems to work. This functionality will probably be sufficent for me. page.printPDF seems to be around for some time and as it is the only solution, that works for report creation, I think it deserves to be documented. Quote Link to comment Share on other sites More sharing options...
AzeoTech Posted March 8, 2023 Share Posted March 8, 2023 Probably. I think its the fact it doesn't work with all controls that is keeping us from making it an official "feature", but I tend to suggest it all the time as I find it creates nice PDFs, especially of graphs, because it actually puts the graphs in the PDF as a vector instead of a raster image keeping it super clean looking. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.