Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Bild / Text drucken ( nicht .NET mit Schriftartauswahl )

Empfohlene Antworten

Veröffentlicht

Hallo.

Da mein Theard Schriftarten von Drucker Verwenden bis jetzt noch nicht beantwortet wurde und ich eine Idee gefunden hab, die leider nicht zum Alten Forumbereich passt, eröffne ich diesen Neuen theard

Also ich habe herausgefunden, dass mein Drucker ( Epson Tm-88II ) nur im Grafikmodus Langsam druckt. ( z.B. Bilder, etc ). Und bei .NET läuft ja alles unter GDI+ und es werden ja Strings "gemalt". Darum ist es wahrscheinlich auch langsam.

Meine idee ist es Daten wie in Exel zu drucken, also direkt den Text ( Idee, etwas über "RAW" ansteuern )

Wie geht das genau?

Liebe Grüße

  • Autor

Ich weiss wie man RAW Daten an den Drucker sendet


BOOL RawDataToPrinter(LPSTR szPrinterName, LPBYTE lpData, DWORD dwCount)

{

  HANDLE hPrinter;

  DOC_INFO_1 DocInfo;

  DWORD dwJob;

  DWORD dwBytesWritten;


  // Need a handle to the printer.

  if( ! OpenPrinter( szPrinterName, &hPrinter, NULL ) )

    return FALSE;


  // Fill in the structure with info about this "document."

  DocInfo.pDocName = "My Document";

  DocInfo.pOutputFile = NULL;

  DocInfo.pDatatype = "RAW";


  // Inform the spooler the document is beginning.

  if( (dwJob = StartDocPrinter( hPrinter, 1, (LPSTR)&DocInfo )) == 0 )

    {

      ClosePrinter( hPrinter );

      return FALSE;

    }


  // Start a page.

  if( ! StartPagePrinter( hPrinter ) )

    {

      EndDocPrinter( hPrinter );

      ClosePrinter( hPrinter );

      return FALSE;

    }


  // Send the data to the printer.

  if( ! WritePrinter( hPrinter, lpData, dwCount, &dwBytesWritten ) )

    {

      EndPagePrinter( hPrinter );

      EndDocPrinter( hPrinter );

      ClosePrinter( hPrinter );

      return FALSE;

    }


  // End the page.

  if( ! EndPagePrinter( hPrinter ) )

    {

      EndDocPrinter( hPrinter );

      ClosePrinter( hPrinter );

      return FALSE;

    }


  // Inform the spooler that the document is ending.

  if( ! EndDocPrinter( hPrinter ) )

    {

      ClosePrinter( hPrinter );

      return FALSE;

    }


  // Tidy up the printer handle.

  ClosePrinter( hPrinter );


  // Check to see if correct number of bytes were written.

  if( dwBytesWritten != dwCount )

    return FALSE;


  return TRUE;

}

Aber damit bin ich nicht weiter gekommen, trozdem danke

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.