Print 2 panels with a comfirm?

I want to print 2 panels, a portrait, a landscape.

Is it possible to confirm one, printing to the same printer?

PrintPanel does not return the printer used.

You can enumerate the printers in the system using this way some Win32API calls (here I am filling a listbox with printer on a reminder of button names):

int CVICALLBACK EnumeratePrinters (int panel, int control, int event,
        void *callbackData, int eventData1, int eventData2)
{
  int            error = 0;
  int            i, numPrt, needed;
  PRINTER_INFO_1 *pi = NULL;
  char           *z = NULL;

  if (event != EVENT_COMMIT) return 0;

  //BOOL EnumPrinters(
  //    DWORD Flags,         // printer object types
  //    LPTSTR Name,         // name of printer object
  //    DWORD Level,         // information level
  //    LPBYTE pPrinterEnum, // printer information buffer
  //    DWORD cbBuf,         // size of printer information buffer
  //    LPDWORD pcbNeeded,   // bytes received or required
  //    LPDWORD pcReturned   // number of printers enumerated
  //);

  // Get required memory size
  EnumPrinters (
    PRINTER_ENUM_LOCAL,      // enumerate local printers
    NULL,                    // name of printer object
    1,                       // general printer info
    NULL,                    // printer information buffer
    0,                       // size of printer information buffer
    &needed,                 // bytes required
    NULL                     // number of printers enumerated
  );

  // Allocate memory
  z = malloc (needed);
  memset (z, 0, needed);

  // Enumerate printers
  if (!EnumPrinters (
    PRINTER_ENUM_LOCAL,      // enumerate local printers
    NULL,                    // name of printer object
    1,                       // general printer info
    z,                       // printer information buffer
    needed,                  // size of printer information buffer
    &needed,                 // bytes required
    &numPrt                  // number of printers enumerated
  )) {
    MessagePopup ("Error", "Error in EnumPrinters.");
    error = GetLastError ();
    goto Error;
  }

  // Allocate structured memory
  pi = calloc (numPrt, sizeof (PRINTER_INFO_1));
  memcpy (pi, z, numPrt * sizeof (PRINTER_INFO_1));

  for (i = 0; i < numPrt; i++) {
    InsertListItem (panel, PANEL_LISTBOX, -1, pi[i].pName, i);
  }

  SetInputMode (panel, PANEL_PRINT, 1);

Error:
  if (z) free (z);
  if (pi) free (pi);
  return 0;
}

The list of printers can be shown in a Panel "options" where the user can select which printer to use, after that you can print with that printer in this way:

int CVICALLBACK PrintSome (int panel, int control, int event,
      void *callbackData, int eventData1, int eventData2)
{
  int  idx;
  char name[64];

  if (event != EVENT_COMMIT) return 0;

  GetCtrlIndex (panel, PANEL_LISTBOX, &idx);
  GetLabelFromIndex (panel, PANEL_LISTBOX, idx, name);

  SetPrintAttribute (ATTR_PRINTER_NAME, name);   // Specify which printer to use
  SetPrintAttribute (ATTR_PRINT_AREA_WIDTH, VAL_INTEGRAL_SCALE);
  SetPrintAttribute (ATTR_PRINT_AREA_HEIGHT, VAL_USE_ENTIRE_PAPER);

  PrintPanel (panel, "", 1, VAL_FULL_PANEL, 1);

  return 0;
}

Nevertheless, it is a little not intuitive and you need to dig and study some of the Win32APIs to get. You can support this idea CVI for an independent command that displays the print dialog box.

Tags: NI Software

Similar Questions

  • HP3070 b611all in a printer: HP3070 unable to scan from the printer control panel

    Hello

    Although I can scan a document from my laptop I can't do it from the printer control panel.

    I tried following the instructions in the Support Center
    "HP Deskjet 3070 e - all-in - One Printer Series - how Scan: from the control panel" but I didn't know where I could: ' activate the scan to the computer connection (Windows only).

    Anywhere there is no mention of "Scan" under settings B3070 only in a separate file, HP Scan on my system...

    Thanks for your help so far.  I now have much more HP files/programs that I started with.  What can delete and to be able to continue to print wireless & scan of the computer, or maybe I should ask what files do I need and I can uninstall.

    I ordered the following cable to establish a connection between my laptop and a printer?  I hope it is the right one.

    USB printer cable lead for HP Hewlett Packard and Lexmark A - B

  • Put option on the page does not work in the Easy Print VI Panel, controls tabs are not displayed

    Found two problems with the screw of report generation:

    (1) in the Panel of VI feel easy (report generation) or the Documentation.vi, the layout options don't work (dug in the sub - VI and found that they are not connected to anything).

    (2) If you have the controls or the lights in a tab control and try to use the Easy Print VI Panel or Documentation.vi with the option to include controls in the report, they do not appear. The only indications/commands that appear are those that are displayed on all tabs (that is to say, to create a control and move it over the tab control so that it appears on every page).  There's a Subvi (Expand_control_ref_with_nested_controls.vi) which is called to handle the nested controls (IE, grapes, berries, etc...), but it should have a case to handle the controls tab.

    Hey Sajosie,

    Dig into the Sub - VI you are right in saying that the Options available to the user input is not connected to anything for most cases. However, in the case of failure to "Quick Print" Layout Options are used to change the layout of the report. In help for this VI, he mentions that this entry is ignored for the report "Standard reports" and "HTML" options However, it does mention that this ignorance of Layout Options is expected for the 'word' or 'Excel' reports.

    Especially regarding the controls and indicators in the report which appear on the tab controls, I can make a product suggestion to do this kind of design more compatible with the mere impression VI Panel façade or Documentation.

  • The WPS54G Wireless Print Server works with Vista?

    The WPS54G Wireless Print Server works with Vista? I have a new Dell Vista laptop and unable to connect to the print server. The other XP machines on my network will connect correctly.

    I just got credit working mine in the answers above with a few small differences.

    1. Add the appropriate printer from the control panel > printers > add printer

    2. Select local printer, and then select [Create New Port] > [Standard TCP/IP Port]

    3. [device type] > [TCP/IP device]. Host name or IP address must be the IP address of the print server device.  I use a linksys router and difficulty mine to 192.168.2.10.  Check and are not [query the printer for and auto...]

    4. once nothing is detected, select [custom] > settings

    5. Select LPR, L2 the name value in the queue for a USB printer.  Turn on [LPR active of counting bytes.  Queue names are distinguished by the printer and I think as Mfg ("queue name" search and replacing your printer for queue names.)

    6. Select the Mfg and printer

    7. If the test page does not have a last thing, it is turn on [Control Panel] LPR Print Services > [programs and features] > [activate Windows features ON OFF] pane.  Go to [Print Services] and check on [LPR Port Monitor]

    Hope that makes the magic for you.

  • How to install the printer with the laptop. Printer was used with another computer.

    I wanted to use a printer with my laptop lexmark. The printer was used with another computer and it worked fine, but when I tried to use it with the laptop, I was not able find the installation disk and tried to install without it. The laptop produces a message indicating he could find the internet facility info if I accepted this. He had apparently fulfilled this function, and I tried to print a document. The document has been printed, but the result was so low, that it was not readable. I then found the installation disk and tried to restart but was confused by the messages and options. I don't have a printer that prints. Help.

    I wanted to use a printer with my laptop lexmark. The printer was used with another computer and it worked fine, but when I tried to use it with the laptop, I was not able find the installation disk and tried to install without it. The laptop produces a message indicating he could find the internet facility info if I accepted this. He had apparently fulfilled this function, and I tried to print a document. The document has been printed, but the result was so low, that it was not readable. I then found the installation disk and tried to restart but was confused by the messages and options. I don't have a printer that prints. Help.

    Unplug the printer from the laptop.  In Vista or Win 7, click Orb (Start), settings, Control Panel, printers. When the Lexmark printer is found, right-click on it and then click on remove.
     
    Equip your drive and install the drivers and programs on the disk, then when told the printer.  You should have a printer now works.
  • Impossible to see or set the printer ports for printer Lexmark Z35 with Vista

    I've been using a printer Lexmark Z35 with Vista Home Premium and then it stopped working.  When I go to the control panel of configuration/printers look at the properties of a printer (even PDF printer), when I click on the Ports tab, nothing happens, it just hangs.  I left alone for 45 minutes and it is still stuck.   I searched online but could not find anything on this.

    Uninstall and reinstall the printer.

    See:

    Add or remove a printer
    http://Windows.Microsoft.com/en-us/Windows-Vista/add-or-remove-a-printer

    Then, download and install the latest vista drivers for the Lexmark support site.

    See also:

    Installation of Printer Ports
    http://TechNet.Microsoft.com/en-us/library/cc775439%28WS.10%29.aspx

    Network printer problems
    http://Windows.Microsoft.com/en-us/Windows-Vista/troubleshoot-network-printer-problems

    Tips for solving problems of USB devices
    http://Windows.Microsoft.com/en-us/Windows-Vista/tips-for-solving-problems-with-USB-devices

    RIP!

  • Dell V313 printer cannot communicate with the computer

    When I try to print from my Acer Aspire Windows 7 on my dell v313, I get the message "communication not available - the printer cannot communicate with the computer. It's already happened, but when I restarted the computer it would print. Now, it won't. I replaced the USB cable and downloaded the last Cabinet V313 - and the software. Ink cartridges are filled. I am holder of a horse's hoof and a 4 leaf clover; but nothing works. What can I try now? Thanks for any help,

    Mike

    Mike,

    You can try to disable the ToolTips of printers. If the printer is wireless, try channel 11 in your wireless router. You can also try to remove computers printer scan list and then restart the computer and see if it prints.

    Start, Control Panel, devices and printer, your printer, printing preferences, advanced, more control options. Tell him to never show. The problem with this setting is that you can not tell if you are weak of ink, printer jams, etc..

    Rick

  • HP Officejet 4620: portable printer communicates only with the computer

    Last home had this printer set up under the name of wireless. lost connection cables so had to buy a new one. Printer goes and copies, scans, etc. Have unplugged, said prayers, and still it wont connect. Just bought new cartridges so you don't want to throw it out the window right away!

    Document is the printer online. Mark Exclamination (troubleshooting) appears on the printer control panel

    Hi @chaloupay,

    I'd love to help you with your Officejet 4620! Thank you for taking the time to post in the Forums of HP.

    I understand that you were able to print until recently, and now you see an exclamation point on the screen of the printer. Performing printing and Scan doctor could help. HP printing and doctor Scan is a free utility (tool) that allows to quickly resolve problems printing, scanning and connectivity, including but not limited to:

    • Connectivity:

      USB: Check that the USB connection from your computer to the HP product works properly.

      Network: Verifies that the network connection between your computer and your network is working properly.

    • Device Status Test: checks the errors of the device, such as paper, paper jams, stands transport and paper issues and provides instructions to resolve the error.

    • Driver: checks the driver missing or corrupt files.

    • Device Manager: check the problems in Device Manager that could prevent printing.

    • Device online: check if the product has been suspended or put in offline and then sets the State back in line if necessary.

    • Print queue: checks and clears pending print jobs in the print queue (a newspaper for printing waiting to print).

    • Port Match: check the port settings for the HP product.

    • Device conflicts: check the conflicts with other drivers, such as the other brands of printers.

    • Ink issues: check the cartridges and the ink levels for issues that affect the print quality.

    • Print settings: check and adjust the print quality settings.

    • Test print: print a test page for the assessment of the print quality and provides options for cleaning and if necessary print head alignment.

    • Scan tests: check the scanning mechanism, drivers, and registry entries.

    Source:try the HP Print and Scan Doctor for Windows

    Click here to download and run the print and Scan Doctor > > www.hp.com/go/tools

    If this does not resolve the problem, after back and let me know if there are all the symbols except the Green checkmarks and what they are next of course. The key is not always easy to find that the key and the box are both in a green circle.

    • If you see only the Green checkmarks (), the tool did not find any problem.

    • If you see green sides (), the utility identified a problem and fix it automatically.

    • If you see yellow exclamation points (), the test failed and requires monitoring of the user, but the step was ignored.

  • If you see a red X (), follow the onscreen instructions to fix the problem.

  • Please let me know if that solves the problem, or if you need assistance. In fact, if this helps you to find a solution, please click on the button "Accept as Solution" down below in this message.

    Thanks, I look forward to hearing back on your part.

  • Not able to print the PDF with firefox 29,0 Preview pdf plugin. Why?

    Not able to print the PDF with firefox 29,0 Preview pdf plugin. Why?

    The 29.0.1 firefox solved my problem!

    Please check: Firefox-> Preferences-> tab-> applications (option) Portable document Format (PDF)-> Preview in firefox

    Good luck!

  • How to return to the earlier version of El Capitan (from 10.11.3 at 10.11.1) with Time Machine? My HP LaserJet M475dw MFP printer worked fine with previous versions, but fails miserably to recognize the device on the same Wi - fi network now?

    How to return to the earlier version of El Capitan (from 10.11.3 at 10.11.1) with Time Machine? My HP LaserJet M475dw MFP printer worked fine with previous versions, but fails miserably to recognize the device on the same Wi - fi network now with 10.11.3.  I would like to restore the previous version of the operating system without losing any data created in various applications since the 10.11.1.  Fortunately, I had only to use Time Machine is rare over the years, I do not know if you have to return the entire drive to the chosen date or it can somehow just go back to a previous state of OS.  Any suggestions, much appreciated.

    OS X El Capitan: revert to a previous version of OS X

  • HP Vivera Photosmart 3210: EXPIRY of the INK. can buy black ink only and print n &amp; B with the range of printers hp Vivera 3210?

    all ink has expired. can I buy only black ink and print n & b with hp Vivera printer, photosmart 3210 all-in-one

    and black and white printing only with color expired ink in there?

    Hi @peanut7949,

    I believe, with this model, you can continue printing with inks has expired. That being said, if you replace only the black ink and continue to print with others (expired), it should be fine.

    Here's what I could find on the subject:

    Each ink cartridge has an expiration date to protect the printing system and ensure a good quality ink. The cartridge expiration date appears on line 53 of the free test report.

  • HP Envy 4504: Envy 4504 photo prints too red with print quality = better

    Hello

    I hope someone can help.

    On my HP Envy 4504 photos are printed OK print normal quality, but when the print quality is set to best photos are printed to the red. In addition, with DPI Maximum printing photos are much too red.

    This takes place two times printed on paper Normal and on Photo paper

    With the GIMP, I tried to make an example of how a photoprint looks like.

    I made the example by changing the color Balance: Red cyan - about + 40:

    (my GIMP is Dutch...)

    Here is the result:

    LEFT: Photo printed in normal quality; Photo on the RIGHT printed in better quality:

    I have already completely remove the software HP Envy and did a clean reinstall. No change.

    I have print-head - cleaning cycles (2 times); color of HP-testprint strips looks very good: all are strong in alignment is correct

    Unfortunately: No picture change in best quality still too red.

    The ink levels are okay.

    Any suggestions what is wrong and what can solve this problem?

    Thank you for your support

    Kees-Jan Timmer

    Hi @Kees-Jan,.

    Welcome to the HP Forums!

    I noticed that your HP Envy 4504 prints photo is too red with print quality = best on Windows 10 operating system. I'm happy to help you!

    Where a setting is disabled, with GIMP, have you tried to print photo quality with other programs? If so, what happened?

    You use genuine HP cartridges or refills?

    None of your ink cartridges are low or empty?

    In the meantime, please make sure that all the steps in this guide, fixing poor print quality are executed. And let me know what happens!

    Thanks for posting and hope to hear from you soon!

    If this, or one of the posts on this thread, helped you to solve the problem, please click 'Accept as Solution' said post. To show you 'like', or that they are grateful for my post, please click the thumbs upwards below. If there is anything else I can do to help, please don't forget to let me know!

  • HP p2-1394: what printer will work with HP p2-1394, windows 8.1

    What printer will work with HP p2-1394, windows 8.1?

    Thank you.  I'll check your suggestion.

  • want to 4500: HP envy 4500 print only not with the iMac

    I have a 4500 desire connected to a new imac. When I send documents to the printer and check the print queue, it says it has connected to the printer and print, but nothing happens. Any idea what's going on?

    Hey @pollagma,

    Welcome to the Forum from HP Support.

    I understand that you are unable to print from Mac with your HP ENVY 4500 e-all-in-one printer. I would like to help.

    I recommend you try the following steps:

    1. Uninstall the printer - click here for instructions.
    2. Fix permissions of the disc on your Mac - click here for instructions.
    3. Once you have finished running the utility above, restart your computer.
    4. Finally, click here to reinstall your printer.

    Please let me know the result of your troubleshooting by responding to this post. If I helped you to solve the problem and that you liked this post, feel free to give me virtual accessories by clicking on the 'Thumbs Up' icon below and by clicking to accept this solution.

    Thanks for posting in the Forum from HP Support. Have a great day!

  • HP Officejet Pro 8600 more e-A: printer only prints blank sheets with a footer only. In preview mode BEFORE PRINTING displays the same.

    Printer only prints white sheets with a footer.  In preview mode BEFORE PRINTING displays the same.

    Used HP Print prints doctor and TEST PRINT correctly and find the Wi - Fi of my printer.

    Problem started right after that MS has downloaded?

    No, it did not apply to Notepad.  I restarted just after MS update and everything printed correctly again.  I had not done so to preserve Web pages active I tried just several days!

Maybe you are looking for

  • HP Pavilion Notebook - 17-f111: laptop won't completely close

    Windows closes but the laptop will not finalize.

  • I have to hold down the fn key to type

    I just bought this computer 5 days ago its an Acer laptop Aspire One and I pressed the fn key to type for example if I want to hit j then number 1 appears. Also if I want uppercase I have to hold down the FN key and shift at the same time key to get

  • BlackBerry Smartphones white Smiley Face on the Message Bar notifier

    Hi guys,. These last two days, I had a face smiling whites appear on my message notification bar.  I can't click on it as need me just to my calendar enteries. I did some digging around and discovered that it might be a BlackBerry messenger friend re

  • shorthand for a very long sentence in windows please

    I used to know how to use a shortcut phrase that might make it appear a long phrase commonly used (for example)... similar to the iphone shortcuts under ' General settings where you type a2-letter sortcut, press "enter" and then shows the previously

  • Import of DataPump

    Hi allWe are 2008R2 in windows server with 2 node RAC v11.2.0.3. My client wants data from database of production in SYNC with staging database.  I choose to use the data pump import. The process that I follow as below(1) export with FULL = Y X DB pr