Jump to content

Printing in Java

BrownZeus

Hi friends,

 

I'm having a quite frustrating F**KING time trying to accomplish this ONE SIMPLE F**KING task.

So I apologize in advance if I come off rude, disrespectful, or aggressive.

 

All I want to do is send a PDF file to Print, with specific settings (Just setting the Page Orientation to Landscape, Using the Java Print API)

 

I've followed dozens of tutorials, copied test code line for line just to see if I myself was missing something AND NONE OF THE CRAP ONLINE IS WORKING. 

 

I'm just trying to get a test program to freaking work so I can use the code in a later project I have planned.

 

So if someone can provide me a test program, with in-line comments that spell everything out cause apparently I'm stupid as all hell, that would be nice.

 

The project I have planned will also be using Apache PDFBox, and I already know the Java Print API (javax.print) will be involved.

If it wasn't already obvious, the lanuage I'm using it Java.

 

Any and all help is sincerely Appreciated.

Link to comment
Share on other sites

Link to post
Share on other sites

is this related to the Fu King brand of computers iv been hearing so much about? People really don't seem to like their products. 

 

14 minutes ago, BrownZeus said:

Any and all help is sincerely Appreciated.

start with the example at the bottom of the api and then ask specific questions where it doesn't behave as intended. https://docs.oracle.com/javase/7/docs/api/javax/print/package-summary.html

             ☼

ψ ︿_____︿_ψ_   

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, SCHISCHKA said:

is this related to the Fu King brand of computers iv been hearing so much about? People really don't seem to like their products. 

 

start with the example at the bottom of the api and then ask specific questions where it doesn't behave as intended. https://docs.oracle.com/javase/7/docs/api/javax/print/package-summary.html

Will do

Link to comment
Share on other sites

Link to post
Share on other sites

5 minutes ago, SCHISCHKA said:

is this related to the Fu King brand of computers iv been hearing so much about? People really don't seem to like their products. 

 

start with the example at the bottom of the api and then ask specific questions where it doesn't behave as intended. https://docs.oracle.com/javase/7/docs/api/javax/print/package-summary.html

Just to make sure I'm not doing anything wrong, in the first try block, I can replace "file.ps" with the path to my test file correct?

Link to comment
Share on other sites

Link to post
Share on other sites

39 minutes ago, SCHISCHKA said:

is this related to the Fu King brand of computers iv been hearing so much about? People really don't seem to like their products. 

 

start with the example at the bottom of the api and then ask specific questions where it doesn't behave as intended. https://docs.oracle.com/javase/7/docs/api/javax/print/package-summary.html

Ok so I've modified the example code to fit the file path needed, and altered the flavor accordingly.

My IDE is saying the program is running successfully, but my printer isn't printing anything.

Do I need to write spooling code as well?

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×