pjl | A JetDirect/PJL Library for Java | 3D Printing library
kandi X-RAY | pjl Summary
kandi X-RAY | pjl Summary
this is a little library for talking pjl to hp jetdirect printers. it may be used to talk pjl to other printers that understand pjl, but i have never tested that, nor do i have a need to. you may ask, why would anyone want to talk directly to a printer?. being able to talk directly to the printer allows you to micromanage job progress. this is important in applications where each paper printed is highly valuable and duplicates or lack of printing could be problematic. for example, i have used it for a (proprietary) check printing system, and i am able to tell when each newly printed check rolls out onto the top bin. being able to tell when this happens allows me to mark it
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Reads the input
- Compares this variable to another
- Joins a character with a character
- Join the variables with the given character
- Entry point for debugging
- Prints the stats about the stats
- Generates a table containing the alert OID
- Returns the query stats for this SNMPP
- Reads variables from a file
- Fires an input event
- Copy an object
- Checks if the given value is a valid value
- Checks that the given value is a valid valid value
- Returns the command as a string
- Sets the password
- Returns a string representation of this command
- Reads an input string
- Read variables from a string
- Creates a deep copy of this variable
- Returns a vector containing all UStatus objects that should be sent to the printer
- Read the input
- Returns a hashCode of this object
- Read variables from a BufferedInputStream
- Returns a string representation of the command
- Join all categories with the given character
pjl Key Features
pjl Examples and Code Snippets
Community Discussions
Trending Discussions on pjl
QUESTION
I am trying to send Printer Job Language commands to a HP 4515 printer. However, the printer does not print anything. Below is my code. The printer is located remotely and I can only ask someone there to check if anything is printed out. Unfortunately nothing was printed out. Are the PJL commands not in good format? How can I get the job status using Java & PJL?
...ANSWER
Answered 2019-Apr-21 at 05:08As noted here, it looks like you are missing the closing 'Universal Exit Language' command (UEL). It is required in PJL. It defines beginning and end of any PJL-based data stream.
E.g.:
QUESTION
I'm trying to send a simple PostScript to a Konica Minolta C364 printer which has a finisher for stapling. I'm able to print a couple of pages and staple them if I do this by printing let's say, a PDF file directly and selecting the appropriate settings from the printing user interface. However, I'm not able to do the same via PostScript commands.
I've tried numerous different commands, adding them both in the beginning and the end of the .ps
file, starting from the simple one:
ANSWER
Answered 2018-Sep-19 at 12:02Device-dependent actions (like Staple, and also Duplex, Tumble, Collate etc) are expected to be controlled, in language level 2 or 3, by calling setpagedevice.
Some device-dependent features (eg Duplex) are well defined in the specification, others are less well defined and manufacturers can create key/value pairs of their own, which are totally undefined. The way the setpagedevice operator works it will ignore anything which it doesn't understand.
So I would expect:
QUESTION
I have to write a functionality that takes a PDF-document and sends it to a printer with some PJL commands. So far so good, I take the document, convert it to Postscript, send the postscript file to the printer with the required commands and the printer prints the document.
Now to the actual problem: Most of the document that needs to be printed by our software are invoices, therefore they are carefully made, such that every element is precisely positioned, and if it's off by millimeters the printed document is invalid. When printing the document directly through Adobe or any pdf viewing software, I can select the actual size
option and everything is fine. Although if I print it via C# and PJL the document has different margins depending on the printer it has been printed on. Until now we used pdfprinting.net, and that option could be selected through pdfPrint.Scale = PdfPrint.ScaleTypes.None
, but how can I do it via PJL?
ANSWER
Answered 2018-Apr-30 at 07:22Checking the PJL Reference Manual (Edition 12, which is the latest I have seen) there is simply no way to scale the page content in PJL.
Even if there were, I'd be surprised if it carried over to the PostScript (as opposed to PCL) interpreter environment, because PostScript has a rich feature set to handle this sort of setup. So basically you're going to need to get the PostScript correct.
Now, when you take a PDF file and produce PostScript from it, you are almost certainly producing generic PostScript; its device-neutral so it doesn't take account of aspects of the physical device.
Most obviously this will be things like hardware margins and unprintable areas. Many devices have limitations on which parts of the media they can print on, due to the paper handling. These will, of course, be different between different printers.
Of course, when you print from the operating system, the printer device driver knows what the printable area of the media is (because its the specific driver for the printer in question), and so it can arrange for the content to be scaled to the actual media.
Ghostscript certainly can produce PostScript (using the ps2write device) which is suitably scaled and translated for a given printer, provided you know what the characteristics of that printer are. In fact if the printer is sophisticated enough, the PostScript program may be able to interrogate the printer to retrieve some of these characteristics (ImagingBBox, PageOffset, Margins, ImageShift) and its then possible to write a PostScript program to dynamically resize the content of the page, based on these values (the PostScript produced by ps2write does not do this...).
QUESTION
This should not be so complicated! The question of plotting a dataframe in R seems to get asked over and over, but not a single solution works for me. I'm trying to create a simple stacked barplot from this dataframe:
...ANSWER
Answered 2018-Apr-17 at 03:51Can I suggest a different approach, based on two observations:
- there are far too many categories (48 tissues) to distinguish by fill colour
- stacking suggests that each tissue as a proportion of the total has some relevance, which I doubt in this case given the very different tissues
So how about plotting tissue against variable (population I assume) and colouring the tiles by value. I use df1
for the data frame name.
QUESTION
I try to send data by Socket from Android phone. I send pdf file to printer for printing. In Java it work correctly, but Kotlin throws SocketException: sendto failed: EBADF (Bad file descriptor), but with Kotlin code, printer whatever printing.
Full stackTrace:
...ANSWER
Answered 2017-Dec-29 at 01:42I solved my problem. For writing data to OutputStream in Kotlin, I used:
QUESTION
Running this command fails:
...ANSWER
Answered 2017-Jul-05 at 16:17Try removing the quotes from the command being generated.
QUESTION
I'm using log4j (1.2.17)
'infinispan-embedded' does work with my logs.
But when I change to work with: 'infinispan-core' I don't recive any logs from Infinispan.
- I have Spring(4.1.4) & Hibernate(4.2.21)
- Infinispan version - 8.2.6.Final
Any ideas?
Thanks.
my dependecy:tree is:
...ANSWER
Answered 2017-Apr-13 at 05:20I've been through similar situations before. The problem here is most likely that there's a dependency missing when using infinispan-core.
The way to address such issues is by step-debugging through the code to understand why the logger is not being found. You can do that by putting a breakpoint at the start of org.jboss.logging.LoggerProviders.findProvider() method. That method detects which logger will be used, whether JDK, Log4j, Log4j2, Slf4j...etc.
So, put back the embedded dependency, put a breakpoint in that method, and verify that Log4j 1.x is added. Then, try running the same with infinispan-core in place and see what provider gets chosen (I guess it's not Log4j 1.x). Then see if adding Log4j 1.x as explicit dependency works...etc :)
QUESTION
How to intercept and change the windows 7 print spool file (.SPL) to add some additional information in the header like '@PJL SET NAME="PainPoint" ' before this file is sent to the printer during the execution of the print job?
The .SPL file partial extract from top is :
...ANSWER
Answered 2017-Mar-01 at 23:41Editing the spool file is obviously trivial. The trick is how to get access to the spool file.
I can think of a few ways offhand:
- Pause the print job after spooling, edit it, then release it. See my answer here. This is not trivial and you may need to resort to third-party software depending on time/effort available.
- Create a print driver or spooler component such as a port or language monitor to edit the file. (Thanks to Carey Gregory for the suggestion to use a language monitor). This is a big topic and you'll have to read a lot of documentation to figure out how to do it, but there is a sample (Pjlmon) in the WDK. Note that the newer V4 driver model for Windows 8/Server 2012 doesn't support these components.
If you don't need to do this transparently you could set up RedMon (free) to call your app to edit the spool file. RedMon will then send it to the desired printer.
VeryPDF has some similar commercial products with more capabilities.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install pjl
You can use pjl like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the pjl component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page