TS3147 os X 10.8.3 "printer is in use"
Although I have never had problems before, for the past 2 days my MAC AirBook has been telling me that the hp wireless printer (HP ENVY 110) is "in use", when in fact it is not "in use". I have downloaded the hp drivers from Apple support, and can print a test page with no problems, computer recognizes wireless HP printer with no problem. In printing the test page, Apple advises that if the test page prints, then the problem is with the computer's drivers or printing process. Does anybody know how to correct this? Thanks!
Oh Nevermind. All I had to do was reset the printer, add it as an IP printer with the protocol set to HP jetdirect- socket, and Bingo. Works just as well as it ever did!!
Similar Messages
-
Cannot print anything when using safari
Cannot print anything when using safari. OSX is Mavericks. Printer is Canon MP620. Have downloaded Mavericks software for printer, but still will not print. I have also repaired the disk hoping that would solve the problem, but to no avail. Can anyone help me please?
Hey ivorfromborehamwood,
Thanks for using Apple Support Communities.
For more information, take a look at:
Troubleshooting printer issues in OS X
http://support.apple.com/kb/ts3147
Delete the affected printer, then add the printer again.
If the issue persists, try these additional steps:
Reset the printing system, then add the printer again.
If the issue still persists, reset the printing system again. Download and install your printer's drivers. Then, add the printer again.
Have a nice day,
Mario -
My iPad shows a message "Cannot find AirPrint printer". I used to use my iPad to print materials using HP wireless printer D110. Now it does not want to print. Is this because I am now using IOS 7? What should I do to solve the problem? Help please.
Restart your WiFi router and printer by removing power for 30 seconds.
-
Problem with NIReport.llb\Print HTML Report using IE.vi on different machines
We have 5 machines here in our workgroup which have the same state regarding security patches and other system updates. We recently found out that there is a problem with the NIReport.llb\Print HTML Report using IE.vi on the different machines.
If I would open the VI on MachineA the control could be loaded. If I would open the VI on MachineB the control could be loaded. If I would copy the VI from MachineB to MachineA and open the VI the control could not be loaded. If I would copy the VI from MachineA to MachineB and open the VI on MachineB the control could be loaded. MachineB could load the version from MachineA and MachineB but on MachineA only the own version will load. I have seen that both versions have the same GUID for the Microsoft Webbrowser but are different in some other aereas.
Since printing HTML Reports is part of the application which will be distributed as application I want to know if someone else have seen such a behaviour or has got problems distributing an application.
Also I want to know which additional information is stored in an Active-X container about the control beside the GUID.
We have Win XP Prof SP2 with MS IE 6.0.2900.2180 on all machines in the workgroup.
Waldemar
Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questionsHi Tom,
this is the VI <vi.lib>\Utillitiy\NIReport.llb\Print HTML Report using IE.vi copied from a machine that can load and run the VI and it will print. On this machine the control in the VI is white.
This VI will give the "Control could not be loaded" message on my machine.
The file shdocvw.dll is 2006-10-23 16:18 size 1.460 KB and I verifyed that both machines have the same version of this file.
Waldemar
Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
Attachments:
Print HTML Report using IE.png 11 KB -
Printing dunning notices using SMARTFORMS,error during parameter transfer
Hi Friends,
I face a error message "Include text ZGA_DUN_HDR does not exist (object TEXT, ID ST)" when i run the dunning run.
I had searched every node for text ZGA_DUN_HDR in the smartform,I didnt find the text in it.
However when I execute the smart form for print preview an error message "Printing dunning notices using SMARTFORMS,error during parameter transfer".This error i believe is due to wrong parameter passing in the fm 'GET_SF_DUNN_DATA'.It raises an error no_parameters_found.All parameters are passed correctly.
Can you guys help me out.
Edited by: RAJIV KAUSHAL on Nov 14, 2008 6:03 PMyou can create this text ZGA_DUN_HDR in SO10 tcode and try ...
-
Printing Dunning Letters using Smartforms
Hi all,
I have a requirement wherein I need to print dunning letters using smartforms; the dunning data are extracted in program SAPF150D2;I modified the subroutine OFI_DUN_ACT to call function module FI_PRINT_DUNNING_NOTICE_SMARTF.
Now I need to extract the dunning data in program SAPF150D2 to be imported to my new form using GET_SF_DUNN_DATA, my question is where do I code the calling of FM GET_SFG_DUNN_DATA? I'm a little bit confused on the step by step process of the dunning data extraction to printing of the form... Thanks...In the INITIALIZATION of the Smartforms, after the call to GET_SF_DUNN_DATA, you have a many informations back, of which the record of MHNK and an internal table of MHND, which you can use to select other informations from database.
So fill or enrich your own internal table in the initialization.
I enclose thereafter a sample to help you
* Load data
CALL FUNCTION 'GET_SF_DUNN_DATA'
EXPORTING
is_sfparam = is_sfparam
IMPORTING
es_mhnk = mhnk
es_t001 = t001
es_knb5 = knb5
es_lfb5 = lfb5
es_t047 = t047
es_t047c = t047c
es_t047i = t047i
es_t056z = t056z
es_f150d = f150d
es_fsabe = fsabe
es_adrnr = adrnr
es_uadrnr = uadrnr
es_adrs = adrs
es_uadrs = uadrs
es_t047b = t047b
eb_testprint = testprint
e_langu = langu
e_lang2 = lang2
es_f150d_esr = f150d_esr
es_paymi = paymi
es_paymo = paymo
TABLES
t_mhnd = th_mhnd
EXCEPTIONS
no_parameters_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
sy-msgid = 'FM'.
sy-msgty = 'E'.
sy-msgno = 461.
RAISE others.
ENDIF.
h_t040a-text1 = space.
show_interest = space.
LOOP AT th_mhnd INTO mhnd WHERE xzins = ' '.
show_interest = 'X'.
EXIT.
ENDLOOP.
* Load user information
DATA: usr21 LIKE usr21, addr3_sel LIKE addr3_sel.
CLEAR: usr21, addr3_sel, addr3_val, adr6.
* Charger fiche profil
SELECT SINGLE * FROM usr21 WHERE bname = sy-uname.
* Récupérer l'adresse
MOVE-CORRESPONDING usr21 TO addr3_sel.
CALL FUNCTION 'ADDR_PERS_COMP_GET'
EXPORTING
address_pers_in_comp_selection = addr3_sel
IMPORTING
address_pers_in_comp_value = addr3_val
EXCEPTIONS
OTHERS = 1.
* load SMTP address
CLEAR adr6.
SELECT SINGLE * FROM adr6
WHERE addrnumber = usr21-addrnumber
AND persnumber = usr21-persnumber.
* date format
SET COUNTRY adrs-land1.
* Group similar posts
DATA: xbseg TYPE bseg,
xbkpf TYPE bkpf,
xpost TYPE th_outtab.
REFRESH: t_post, t_cumul_waers.
LOOP AT th_mhnd INTO mhnd.
* Select lines to use
IF mhnk-gmvdt IS INITIAL.
IF mhnd-xzalb <> space OR mhnd-mansp <> space.
CONTINUE.
ELSEIF t047b-xpost NE 'X' AND mhnd-xfael <> 'X'.
CONTINUE.
ENDIF.
ENDIF.
* Map data
CLEAR xpost.
MOVE-CORRESPONDING mhnd TO xpost.
* Load text from bseg
SELECT SINGLE sgtxt INTO xpost-sgtxt FROM bseg
WHERE bukrs EQ mhnd-bbukrs AND belnr EQ mhnd-belnr
AND gjahr EQ mhnd-gjahr AND buzei EQ mhnd-buzei.
PERFORM edit_text CHANGING xpost-zuonr mhnd-xblnr xpost-sgtxt.
* if "Payment difference" get the date of original document
IF mhnd-bschl = '06'.
SELECT SINGLE bldat INTO xpost-bldat
FROM bkpf
WHERE bukrs = mhnd-bukrs
AND belnr = mhnd-rebzg
AND gjahr = mhnd-rebzj.
ENDIF.
* Collect posts to print
COLLECT xpost INTO t_post.
* Collect amount per currency
MOVE-CORRESPONDING xpost TO cumul.
COLLECT cumul INTO t_cumul_waers.
ENDLOOP.
* Load customer information
SELECT SINGLE * FROM kna1 INTO kna1
WHERE kunnr = mhnk-kunnr.
SELECT SINGLE * FROM knb1 INTO knb1
WHERE bukrs = mhnk-bukrs
AND kunnr = mhnk-kunnr.
* Convert date to text
PERFORM convert_date USING control_parameters-langu mhnk-laufd
CHANGING text_date.
PERFORM convert_date USING control_parameters-langu mhnk-prndt_before
CHANGING text_prev.
PERFORM convert_date USING control_parameters-langu mhnk-grdat
CHANGING text_extr.
Regards -
PrintDataGrid's DataGridColumn - Embedded image not printing when you use TextFlow in the item rende
I'm printing a datagrid using something like this...
<mx:PrintDataGrid
id="printDataGrid"
width="100%"
height="100%"
showHeaders="false"
borderVisible="false"
horizontalGridLines="false"
variableRowHeight="true"
dataProvider="{titles}"
>
<mx:columns>
<mx:DataGridColumn
itemRenderer="renderer.TitlePrintRenderer"
/>
</mx:columns>
</mx:PrintDataGrid>
TitlePrintRenderer.mxml has s:RichText component. I use RichText's textFlow property to render the text. The approach is working fine except that if the textFlow has embedded images (<img source=... />), the images are not printed!
Is this a bug? Is it a limitation? Has anyone come across this issue?
I'm using Flex SDK 4.5.1After struggling for 4+ days on using timer / events for printing PrintDataGrid with embedded images in RichText's textFlow, I tried your other suggestion... to convert <img> tags to InlineGraphicElement and give it Bitmap from image loaded from a .gif file. The approach works but the printout skips images in a few rows!
I've this test case in which, every time I print, it skips printing image in the second row! I also implemented this approach in a more complex test case and depending on the total number of rows, it would skip printing image in different number of rows. I'm suspecting that even if you construct InlineGraphicElement from bitmap loaded from an image, PrintDataGrid's renderer still skips printing image intermittently.
I would very much appreciate it if you could create small project from my following code and verify this behavior. I'm at my wit's end in getting this printing to work.
PrintImagesTest.mxml
=================
<?xml version="1.0" encoding="utf-8"?>
<s:Application
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
minWidth="955" minHeight="600"
initialize="initData();"
viewSourceURL="srcview/index.html"
>
<s:layout>
<s:VerticalLayout
paddingLeft="20" paddingRight="20"
paddingTop="20" paddingBottom="20"
/>
</s:layout>
<mx:Button
label="Print"
click="printClickHandler();"
/>
<fx:Script>
<![CDATA[
import flash.utils.setTimeout;
import flashx.textLayout.elements.InlineGraphicElement;
import flashx.textLayout.elements.ParagraphElement;
import flashx.textLayout.elements.SpanElement;
import flashx.textLayout.elements.TextFlow;
import mx.collections.ArrayCollection;
import mx.printing.*;
import mx.utils.OnDemandEventDispatcher;
public var contentData:ArrayCollection;
private var embeddedImages:ArrayCollection;
private var numberOfImagesLoaded:int;
public var printJob:FlexPrintJob;
public var thePrintView:FormPrintView;
public var lastPage:Boolean;
private var textFlowNS:Namespace = new Namespace("http://ns.adobe.com/textLayout/2008");
public function initData():void {
contentData = new ArrayCollection();
var page:int = 0;
for (var z:int=0; z<20; z++) {
var content:Object = new Object();
content.srNo = z+1;
content.contentText =
"<TextFlow whiteSpaceCollapse='preserve' xmlns='http://ns.adobe.com/textLayout/2008'>" +
"<span>some text</span>" +
"<img width='53' height='49' source='assets/images/formula.gif'/>" +
"</TextFlow>";
contentData.addItem(content);
public function printClickHandler():void {
convertToTextFlow();
private function convertToTextFlow():void {
embeddedImages = new ArrayCollection();
numberOfImagesLoaded = 0;
for each (var contentElement:Object in contentData) {
extractImageInfo(contentElement.contentText);
if (embeddedImages.length > 0) {
loadImage(embeddedImages.getItemAt(0).source);
} else {
printData();
private function extractImageInfo(contentText:String):void {
var textXml:XML = new XML(contentText);
var imageList:XMLList = textXml.textFlowNS::img;
for each (var img:XML in imageList) {
var embeddedImage:Object = new Object();
embeddedImage.source = String(img.@source);
embeddedImage.width = parseInt(img.@width);
embeddedImage.height = parseInt(img.@height);
embeddedImages.addItem(embeddedImage);
private function loadImage(imageSource:String):void {
var loader:Loader = new Loader();
var urlRequest:URLRequest = new URLRequest(imageSource);
loader.load(urlRequest);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded);
private function imageLoaded(e:Event):void {
embeddedImages.getItemAt(numberOfImagesLoaded).bitmap = (Bitmap)(e.target.content);
embeddedImages.getItemAt(numberOfImagesLoaded).width = ((Bitmap)(e.target.content)).width;
embeddedImages.getItemAt(numberOfImagesLoaded).height = ((Bitmap)(e.target.content)).height;
++numberOfImagesLoaded;
if (numberOfImagesLoaded < embeddedImages.length) {
loadImage(embeddedImages.getItemAt(numberOfImagesLoaded).source);
} else {
// all the images have been loaded... convert to textflow
buildContent();
printData();
private function buildContent():void {
var contentIndex:int = 0;
for each (var contentElement:Object in contentData) {
if (hasImage(contentElement.contentText)) {
buildTextFlow(contentElement, contentIndex);
++contentIndex;
private function buildTextFlow(content:Object, contentIndex:int):void {
var textXml:XML = new XML(content.contentText);
var p:ParagraphElement = new ParagraphElement();
for each(var child:XML in textXml.children()) {
switch (child.localName()) {
case "span":
var span:SpanElement;
span = new SpanElement();
span.text = child;
span.fontSize = 10;
p.addChild(span);
break;
case "img":
var image:InlineGraphicElement;
image = new InlineGraphicElement();
image.source = embeddedImages.getItemAt(contentIndex).bitmap;
image.width = embeddedImages.getItemAt(contentIndex).width;
image.height = embeddedImages.getItemAt(contentIndex).height;
p.addChild(image);
break;
content.textFlow = new TextFlow();
content.textFlow.addChild(p);
private function hasImage(contentText:String):Boolean {
var textXml:XML = new XML(contentText);
var imageList:XMLList = textXml.textFlowNS::img;
if (imageList.length() > 0) {
return true;
} else {
return false;
private function printData():void {
printJob = new FlexPrintJob();
lastPage = false;
if (printJob.start()) {
thePrintView = new FormPrintView();
addElement(thePrintView);
thePrintView.width=printJob.pageWidth;
thePrintView.height=printJob.pageHeight;
thePrintView.printDataGrid.dataProvider = contentData;
thePrintView.showPage("single");
if(!thePrintView.printDataGrid.validNextPage) {
printJob.addObject(thePrintView);
} else {
thePrintView.showPage("first");
printJob.addObject(thePrintView);
while (true) {
thePrintView.printDataGrid.nextPage();
thePrintView.showPage("last");
if(!thePrintView.printDataGrid.validNextPage) {
printJob.addObject(thePrintView);
break;
} else {
thePrintView.showPage("middle");
printJob.addObject(thePrintView);
removeElement(thePrintView);
printJob.send();
]]>
</fx:Script>
</s:Application>
FormPrintView.mxml
===============
<?xml version="1.0"?>
<mx:VBox
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:MyComp="myComponents.*"
backgroundColor="#FFFFFF"
paddingTop="50" paddingBottom="50" paddingLeft="50"
>
<fx:Script>
<![CDATA[
import mx.core.*
public function showPage(pageType:String):void {
validateNow();
]]>
</fx:Script>
<mx:PrintDataGrid
id="printDataGrid"
width="60%"
height="100%"
showHeaders="false"
borderVisible="false"
horizontalGridLines="false"
variableRowHeight="true"
>
<mx:columns>
<mx:DataGridColumn
itemRenderer="MyPrintRenderer"
/>
</mx:columns>
</mx:PrintDataGrid>
</mx:VBox>
MyPrintRenderer.mxml
=================
<?xml version="1.0" encoding="utf-8"?>
<s:MXDataGridItemRenderer
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:bslns="com.knownomy.bsl.view.component.*"
>
<s:layout>
<s:VerticalLayout
paddingLeft="5"
paddingRight="5"
paddingTop="3"
paddingBottom="3"
gap="5"
horizontalAlign="left"
clipAndEnableScrolling="true"
/>
</s:layout>
<fx:Declarations>
</fx:Declarations>
<s:HGroup
width="100%"
gap="5"
verticalAlign="middle"
>
<s:Label
text="{data.srNo}"
color="0x000000"
fontFamily="Verdana"
fontSize="10"
/>
<s:RichText
id="title"
width="700"
textFlow="{myTextFlow}"
color="0x000000"
fontFamily="Verdana"
fontSize="10"
/>
</s:HGroup>
<fx:Metadata>
</fx:Metadata>
<s:states>
<s:State name="normal" />
<s:State name="hovered" />
<s:State name="selected" />
</s:states>
<fx:Script>
<![CDATA[
import flashx.textLayout.elements.TextFlow;
[Bindable]
private var myTextFlow:TextFlow;
override public function set data(value:Object) : void {
if (value != null) {
super.data = value;
myTextFlow = data.textFlow;
]]>
</fx:Script>
</s:MXDataGridItemRenderer> -
Can not print report when using HTML or DHTML
Can not print report when using HTML or DHTML. When I open the report and click the print icon I get a small blank dialog box and then nothing. If I change to activex it works and I can print.
Any Ideas?
Thanks
JeffHi,
I did not come across this situation before. Did you apply any fix packs. Try to check whether its a issue which can be fixed by applying fix pack( try to check release notes of fix pack and see if they mentioned any thing about this).
Thanks,
SK. -
Should the print company I use be able to change a file to spot color for me?
I recently sent a document in to a major print company to have a folder printed. The document was created in Illustrator using only two colors. They said they could not print it because it was still more than two colors and that I needed to change it to a two color document using Pantone Spot Color.
I've never had to do that for a print company before but I've also never had a two color project before. I opened the file back up and selected my objects and "recolored" the work and deleted all the swatches aside from the two colors I needed that were now Pantone Spot Color (HSB). It literally took me 2 minutes.
The reason I am asking is because they pretty much said that I don't know what I'm doing, which to a designer is completely insulting. We all do new things from time to time but that is an insult. Shouldn't they, a large print company with years of experience, know how to do this for me? They had the original design file.. Maybe they don't know what they are doing?
Any clarity on as to why I needed to do it and not them is greatly appreciated. Also.. any direction as the best way to use spot color over cmyk is appreciated too....which to a designer is completely insulting...
What's so special about "a designer"?
Prior to the mid 1980s, designers could get away with prima Donna attitudes, because they (or their employers) were paying pre-press "color houses" around $350 per hour to tweak colors to sooth their oh-so-erudite discernment and hyper-developed color sensitivities, and to gain reimbursement for the $100 per plate lunches on proof-check days.
That all changed when designers (and their employers) got tired of paying those fees and took on the responsibility for the technical side of assembling their designs into something printable. That was the so-called "desktop revolution" and "revolution" was not a bad word for it. It turned a huge industry on its head. Color houses which didn't adopt PostScript devices and workflows were soon dropping like flies--and so were designers who didn't climb down off their lofty pedestals and buckle down to learning the technical realities of what they were doing.
Don't be insulted, but the simple fact is, you still don't know what you're doing if you think converting any given process color job to a two-spot job is "just a couple of minutes' work." Only in the very simplest designs would it be as simple as re-defining a couple of process Swatches as spot color Swatches.
In Illustrator in particular, doing so won't even work if the original Swatches were not originally defined as Global Swatches.
If those two process Swatches were used in any Blends, converting them to spot will likely not update the intermediate steps of the Blend. In earlier versions of Illustrator, the same problem applied to grads.
You can often get away with not having properly trapped the file with process swatches, because there are potentially four component inks which may be shared between adjacent different-color objects. Spot inks are not so forgiving. Trapping is essential if the two spot colors touch.
So you really expect a printer to just have a policy to do that for you? And thereby bear responsibility for anything they may misinterpret or overlook that may cause a registration sliver on press and thereby loose every bit of profit on the printing (which these days is cut-throat competitive)?
No. It's your responsibility to build the file correctly. The printing houses I use know better. They know I would have a coniption fit if I ever caught them modifying one of my files. They know they are to return any problem file to me for correction.
JET -
We are trying to implement a process so that any document that needs to be printed through our Java application will be printed as PDF using Adobe Reader.
For which, We created and execute the below command line to call Adobe Reader and print the PDF on a printer.
"C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe" /T "\\<Application Server>\Report\<TEST.PDF>" "<Printer Name>".
Current Situation: The above command line parameter when executed is working as expected in a User's Workspace.
When executed in a command line on the Application Server, it is working as expected.
But, the same is not working while executing it from Deployed environment.
Software being used: 1. Adobe 11.0 enterprise version. 2. Webshpere Application Server 8.5.5.2.
Please let us know if there is a way to enable trace logs in Adobe Reader to further diagnose this issue.This is the Acrobat.com forum. Your question will have a much better chance being addressed in the Acrobat SDK forum.
-
We are trying to implement a process so that any document that needs to be printed through our Java application will be printed as PDF using Adobe Reader. For which, We created and execute the below command line to call Adobe Reader and print the PDF on a printer."C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe" /T "\\<Application Server>\Report\<TEST.PDF>" "<Printer Name>". Current Situation: The above command line parameter when executed is working as expected in a User's Workspace. When executed in a command line on the Application Server is working as expected. But, the same is not working while executing it from Deployed environment.Software being used: 1. Adobe 11.0 enterprise version. 2. Webshpere Application Server 8.5.5.2. Please let us know if there is a way to enable trace logs in Adobe Reader to further diagnose this issue.
This is the Acrobat.com forum. Your question will have a much better chance being addressed in the Acrobat SDK forum.
-
Printer is in use message, and unable to print!
Good Afternoon-
I work with a copier sales/service company, and I've been dealing with a driver installation issue that I'm hoping SOMEONE can help me with.
When installing a copier on a customer network, I use the manufacturer's installer file, and then configure the new printer in "System Preferences"... followed by some configuration settings in CUPS. Most times the installation goes off without a hitch, but occasionally when printing a test page (or ANY page for that matter) I see a "Processing-Printer is in use" message in CUPS, and then after 30 seconds or so, the job fails to print.
I set them up as a IP printer, using Line Printer Daemon with "lp" in the queue name, and the correct drivers. I've set up multiple machines in the same office, sometimes using the same OS-X version... only to have one of the devices fail to print. Everything else works correctly, including the built-in printer utility that's in the print drivers.
Can someone point me in the right direction... I'm stumped at this point.
Thanks in advance- Steve
(Please keep in mind for every 100 printer installations I do, 3-4 will be on a Mac.... and I'm Mac "Familiar", not fluent... so please answer accordingly)Pahu-
Thanks for the quick response. I will change the configuration when I can get back to the customer's location, and see if that resolves the problem.
What's odd to me is I'm just wondering WHY some computers will print just fine with the LPD configuration, while others won't. I will try your suggestion though.. Deeply appreciated!!
Steve -
Print PDF file using Acrobat SDK - Warning message
Hello,
We are trying to create automatic program in c# that will print all pdf files located in a specific folder, using Adobe Acrobat 9.0 SDK.
Whenever the application tries to print file, we receive a warning message ("WARNING! A script has requested to print an Acrobat file. This could print an entire document. Do you want to proceed printing?").
If we press yes, the file is printed, but next time we'll run the application, this message will appear again.
Since this application supposed to run automatically (with no interaction with the end users), we want to prevent this warning message from appearing.
How can we eliminate this warning message?
Is there any other way to print PDF files using Adobe Acrobat from another application?
Thanks,
Lilach.joeln3: I believe the original post refers to a client application, not a web page. Why use JavaScript from within a client application? I understood their use case to involve a client app referencing the PDF Library, loading various PDF files, and using one (or more) of the PDF Library's Print methods to invoke Acrobat's internal print routines.
Dave -
Help needed:Printing HTML file using javax.print
Hi
I am using the following code which i got form the forum for rpinting an HTML file.
The folllowing code is working fine, but the problem is the content of HTML file is not getting printed. I am geeting a blank page with no content. What is the change that is required in the code? ALso is there any simpler way to implement this. Help needed ASAP.
public boolean printHTMLFile(String filename) {
try {
JEditorPane editorPane = new JEditorPane();
editorPane.setEditorKit(new HTMLEditorKit());
//editorPane.setContentType("text/html");
editorPane.setSize(500,500);
String text = getFileContents(filename);
if (text != null) {
editorPane.setText(text);
} else {
return false;
printEditorPane(editorPane);
return true;
} catch (Exception tce) {
tce.printStackTrace();
return false;
public String getFileContents(String filename) {
try {
File file = new File(filename);
BufferedReader br = new BufferedReader(new FileReader(file));
String line;
StringBuffer sb = new StringBuffer();
while ((line = br.readLine()) != null) {
sb.append(line);
br.close();
return sb.toString();
} catch (Exception tce) {
tce.printStackTrace();
return null;
public void printEditorPane(JEditorPane editorPane) {
try {
HTMLPrinter htmlPrinter = new HTMLPrinter();
htmlPrinter.printJEditorPane(editorPane, htmlPrinter.showPrintDialog());
} catch (Exception tce) {
tce.printStackTrace();
* Sets up to easily print HTML documents. It is not necessary to call any of the setter
* methods as they all have default values, they are provided should you wish to change
* any of the default values.
public class HTMLPrinter {
public int DEFAULT_DPI = 72;
public float DEFAULT_PAGE_WIDTH_INCH = 8.5f;
public float DEFAULT_PAGE_HEIGHT_INCH = 11f;
int x = 100;
int y = 80;
GraphicsConfiguration gc;
PrintService[] services;
PrintService defaultService;
DocFlavor flavor;
PrintRequestAttributeSet attributes;
Vector pjlListeners = new Vector();
Vector pjalListeners = new Vector();
Vector psalListeners = new Vector();
public HTMLPrinter() {
gc = null;
attributes = new HashPrintRequestAttributeSet();
flavor = null;
defaultService = PrintServiceLookup.lookupDefaultPrintService();
services = PrintServiceLookup.lookupPrintServices(flavor, attributes);
// do something with the supported docflavors
DocFlavor[] df = defaultService.getSupportedDocFlavors();
for (int i = 0; i < df.length; i++)
System.out.println(df.getMimeType() + " " + df[i].getRepresentationClassName());
// if there is a default service, but no other services
if (defaultService != null && (services == null || services.length == 0)) {
services = new PrintService[1];
services[0] = defaultService;
* Set the GraphicsConfiguration to display the print dialog on.
* @param gc a GraphicsConfiguration object
public void setGraphicsConfiguration(GraphicsConfiguration gc) {
this.gc = gc;
public void setServices(PrintService[] services) {
this.services = services;
public void setDefaultService(PrintService service) {
this.defaultService = service;
public void setDocFlavor(DocFlavor flavor) {
this.flavor = flavor;
public void setPrintRequestAttributes(PrintRequestAttributeSet attributes) {
this.attributes = attributes;
public void setPrintDialogLocation(int x, int y) {
this.x = x;
this.y = y;
public void addPrintJobListener(PrintJobListener pjl) {
pjlListeners.addElement(pjl);
public void removePrintJobListener(PrintJobListener pjl) {
pjlListeners.removeElement(pjl);
public void addPrintServiceAttributeListener(PrintServiceAttributeListener psal) {
psalListeners.addElement(psal);
public void removePrintServiceAttributeListener(PrintServiceAttributeListener psal) {
psalListeners.removeElement(psal);
public boolean printJEditorPane(JEditorPane jep, PrintService ps) {
if (ps == null || jep == null) {
System.out.println("printJEditorPane: jep or ps is NULL, aborting...");
return false;
// get the root view of the preview pane
View rv = jep.getUI().getRootView(jep);
// get the size of the view (hopefully the total size of the page to be printed
int x = (int) rv.getPreferredSpan(View.X_AXIS);
int y = (int) rv.getPreferredSpan(View.Y_AXIS);
// find out if the print has been set to colour mode
DocPrintJob dpj = ps.createPrintJob();
PrintJobAttributeSet pjas = dpj.getAttributes();
// get the DPI and printable area of the page. use default values if not available
// use this to get the maximum number of pixels on the vertical axis
PrinterResolution pr = (PrinterResolution) pjas.get(PrinterResolution.class);
int dpi;
float pageX, pageY;
if (pr != null)
dpi = pr.getFeedResolution(PrinterResolution.DPI);
else
dpi = DEFAULT_DPI;
MediaPrintableArea mpa = (MediaPrintableArea) pjas.get(MediaPrintableArea.class);
if (mpa != null) {
pageX = mpa.getX(MediaPrintableArea.INCH);
pageY = mpa.getX(MediaPrintableArea.INCH);
} else {
pageX = DEFAULT_PAGE_WIDTH_INCH;
pageY = DEFAULT_PAGE_HEIGHT_INCH;
int pixelsPerPageY = (int) (dpi * pageY);
int pixelsPerPageX = (int) (dpi * pageX);
int minY = Math.max(pixelsPerPageY, y);
// make colour true if the user has selected colour, and the PrintService can support colour
boolean colour = pjas.containsValue(Chromaticity.COLOR);
colour = colour & (ps.getAttribute(ColorSupported.class) == ColorSupported.SUPPORTED);
// create a BufferedImage to draw on
int imgMode;
if (colour)
imgMode = BufferedImage.TYPE_3BYTE_BGR;
else
imgMode = BufferedImage.TYPE_BYTE_GRAY;
BufferedImage img = new BufferedImage(pixelsPerPageX, minY, imgMode);
Graphics myGraphics = img.getGraphics();
myGraphics.setClip(0, 0, pixelsPerPageX, minY);
myGraphics.setColor(Color.WHITE);
myGraphics.fillRect(0, 0, pixelsPerPageX, minY);
java.awt.Rectangle rectangle=new java.awt.Rectangle(0,0,pixelsPerPageX, minY);
// call rootView.paint( myGraphics, rect ) to paint the whole image on myGraphics
rv.paint(myGraphics, rectangle);
try {
// write the image as a JPEG to the ByteArray so it can be printed
Iterator writers = ImageIO.getImageWritersByFormatName("jpeg");
ImageWriter writer = (ImageWriter) writers.next();
// mod: Added the iwparam to create the highest quality image possible
ImageWriteParam iwparam = writer.getDefaultWriteParam();
iwparam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT) ;
iwparam.setCompressionQuality(1.0f); // highest quality
ByteArrayOutputStream out = new ByteArrayOutputStream();
ImageOutputStream ios = ImageIO.createImageOutputStream(out);
writer.setOutput(ios);
// get the number of pages we need to print this image
int imageHeight = img.getHeight();
int numberOfPages = (int) Math.ceil(minY / (double) pixelsPerPageY);
// print each page
for (int i = 0; i < numberOfPages; i++) {
int startY = i * pixelsPerPageY;
// get a subimage which is exactly the size of one page
BufferedImage subImg = img.getSubimage(0, startY, pixelsPerPageX, Math.min(y - startY, pixelsPerPageY));
// mod: different .write() method to use the iwparam parameter with highest quality compression
writer.write(null, new IIOImage(subImg, null, null), iwparam);
SimpleDoc sd = new SimpleDoc(out.toByteArray(), DocFlavor.BYTE_ARRAY.JPEG, null);
printDocument(sd, ps);
// reset the ByteArray so we can start the next page
out.reset();
} catch (PrintException e) {
System.out.println("Error printing document.");
e.printStackTrace();
return false;
} catch (IOException e) {
System.out.println("Error creating ImageOutputStream or writing to it.");
e.printStackTrace();
return false;
// uncomment this code and comment out the 'try-catch' block above
// to print to a JFrame instead of to the printer
/* JFrame jf = new JFrame();
PaintableJPanel jp = new PaintableJPanel();
jp.setImage( img );
JScrollPane jsp = new JScrollPane( jp );
jf.getContentPane().add( jsp );
Insets i = jf.getInsets();
jf.setBounds( 0, 0, newX, y );
jf.setDefaultCloseOperation( JFrame.DISPOSE_ON_CLOSE );
jf.setVisible( true );*/
return true;
* Print the document to the specified PrintService.
* This method cannot tell if the printing was successful. You must register
* a PrintJobListener
* @return false if no PrintService is selected in the dialog, true otherwise
public boolean printDocument(Doc doc, PrintService ps) throws PrintException {
if (ps == null)
return false;
addAllPrintServiceAttributeListeners(ps);
DocPrintJob dpj = ps.createPrintJob();
addAllPrintJobListeners(dpj);
dpj.print(doc, attributes);
return true;
public PrintService showPrintDialog() {
return ServiceUI.printDialog(gc, x, y, services, defaultService, flavor, attributes);
private void addAllPrintServiceAttributeListeners(PrintService ps) {
// add all listeners that are currently added to this object
for (int i = 0; i < psalListeners.size(); i++) {
PrintServiceAttributeListener p = (PrintServiceAttributeListener) psalListeners.get(i);
ps.addPrintServiceAttributeListener(p);
private void addAllPrintJobListeners(DocPrintJob dpj) {
// add all listeners that are currently added to this object
for (int i = 0; i < pjlListeners.size(); i++) {
PrintJobListener p = (PrintJobListener) pjlListeners.get(i);
dpj.addPrintJobListener(p);
// uncomment this also to print to a JFrame instead of a printer
/* protected class PaintableJPanel extends JPanel {
Image img;
protected PaintableJPanel() {
super();
public void setImage( Image i ) {
img = i;
public void paint( Graphics g ) {
g.drawImage( img, 0, 0, this );
Thanks
RamRam,
I have had printing problems too a year and a half ago. I used all printing apis of java and I still find that it is something java lacks. Now basically you can try autosense. To check whether your printer is capable of printing the docflavor use this PrintServiceLookup.lookupPrintServices(flavor, aset); . If it lists the printer then he can print the document otherwise he can't. I guess that is why you get the error.
Regards,
Kevin -
Printing to PDF using Chrome, and then save as a Word doc.
I want to print a webpage using Chrome to PDF, and then save that PDF to a Word document.
The problem is occurring when saving the PDF to a Word doc, as the Word document is blank.
Im using Adobe Acrobat X, Chrome version 32.0.1700.107 m.
(This question may seem a little strange/pointless, however current workflows within my workplace requires documents to be saved from online as PDFs, sent as PDFs, and staff then either save as PDFs or some convert the files to word documents as necessary)
I can already do this using Firefox, but saving to PDF using Chrome is significantly faster.I'm sure you're aware that here you have an Acrobat user-2-user forum. Note a generic Q&A forum for non-Adobe products that, coincidentally, can create PDF.
The quality of Export from Acrobat or Adobe's online subscription services very much depends upon the "inner quality" of how the PDF was created.
GIGO is very much operative.
Good In Good Out -- Garbage In Garbage Out. Sounds like you have the later.
Regardless what is making the PDF is not Acrobat. Consequently "process support" would be with the software house that is responsible for the process.
Be well...
Maybe you are looking for
-
I just bought a Macbook Air almost a month now. When I bought it, the technician installed Microsoft Office 365 as they were having a promotion at the time. However after a week of using it, it started popping up a notice saying that it cannot verify
-
How do I print from my ipad2 to my hp 7280 printer? How do I set this up
I am having trouble trying to print from my ipad2 to my hp printer c7280? How do I set this up?
-
My early 2008 MacBook Pro runs very hot and can't tell if the fan is running. Any suggestions?
-
Dimension Table and Fact Tables
Hi, Is there any way to see the Dimension Table contents and Fact Table Contents. For eg:- I should be able to see the DIM ID and the SID's of a Dimension.
-
http://www.amazon.com/Corsair-DDR3-Laptop-Memory-CMSO8GX3M2A1333C9/dp/tech-data/ B002YUF8ZG/ref=de_a_smtd Just attempted to install this RAM in an April 2010 MacBook Pro 13 inch. The Apple comes on the screen during boot but it locks up. Not succes