Unable to print after update to DAQfactory


Recommended Posts

  • 1 month later...

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.

Link to comment
Share on other sites

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).

Link to comment
Share on other sites

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.


Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.