[JS] Testing whether PageItem will printing anything

There are a slew of attributes that determine whether a PageItem will actually result in something being printed on a page.  For example, the PageItem could be non-printing, or transparent, or have 0 thickness strokes, or no stroke or fill color, etc.  It may or may not have a drop shadow, halo, etc.
Testing all of these attributes seems excessive.  Is there any reasonable way to determine whether a PageItem will actually result in any output if, for example, exportFile() is called on the page?
I'm trying to output EPS files, but only if there are objects that will cause marks to be drawn on the page.  Otherwise, I get EPS files that fail in Distiller and report that no PDF was output because the EPS was empty.
Any suggestions?
Thanks!
-pd

A reasonable way? Like a boolean value? No -- ID doesn't check if you are actually printing something (the one exception being that blasted "Include blank pages" that's OFF by default!).
Unfortunately, there are tons of reasons any given object will print, and you have to check them all before deciding it does not.
non-printing, or transparent, or have 0 thickness strokes, or no stroke or fill color
Each and every one of those 'or's should be and; each single one on its own can leave a mark on the page. (Not that entire list, but you know what I mean.)
From your list, I'm missing at least the following:
Is the layer it is on visible? (If not, you are done!)
Is the layer set to 'Nonprinting'? (Ditto.)
Does the object contain text? Have to check its attributes -- fill, stroke. If it contains footnotes, anchored objects, tables: if the 'main' text is invisible, check all of these.
Does it contain any other objects? Have to check their attributes as well -- recursively! Fortunately, the very first positive "Does print" hit is definitive for all objects higher up in the chain. Check allPageItems -- this superclass should cover all possibilites, except (I think) Buttons.
How bad do you consider the Distiller error? It might be easier to handle that gracefully instead.
Another way would be to cheat, and put something paper coloured on every page

Similar Messages

  • Printer won't print anything from the internet

    Had a hp officejet 4500 printer and now have a HP ENVY 4500 e-ALL-in-On series and neither one will print anything from the internet.
    Any ideas on what to check ?????

    Hi dukster,
    I'll see if I can find anything for you. What kind of computer and OS do you have? A Mac or a PC? Also, what browsers are you trying to print from?
    *** If my reply was helpful, please click on the "Kudos Thumbs-Up" on the right, as a way to say "Thanks!".
    If this reply also fixed your issue - please click the "Accept as Solution" button, so that others can find the same answer. ***

  • HP Officejet Pro 8500A Premium will not print docs from computer, but will print a test page.

    HP Officejet Pro 8500A Premium will not print docs from computer, but will print a test page.  I continually get a message that the computer cannot communicate with the printer.   Not only will it not print docs, it will not print web pages using IE 11 or Google Chrome.
    I've used Print and Scan Doctor, it always reports there are no issues and prints a test page even though I can't print anything else. 
    Each time I want to print, I must reboot the computer.  After reboot I have one chance to print.   This problem started February 15, 2015.  
    My operating system is Windows 8.1.   I have unintalled the HP software, rebooted, then reinstalled the software:
    OJ8500_A910_1315-1.exe
    HP Print and Scan Doctor - HPPSdr.exe
    HPSupportSolutionsFramework-11.51.0049.msi
    All versions were last downloaded on April 4, 2015.
    I have a home wireless network (Ubee DDW366 router).  All other devices in the house will print to the 8500A printer without issues:  2 Toshiba laptops, 2 Android phones, and 1FireHD.
    The desk top is installed with a Netgear Network card I don't know the model, but I had it tested by a PC Tech to confirm that the card is working.   The card and Windows 8.1 were installed on January 3, 2015.
    I have run virus scans and malware scans.  Each time they show there are no issues with my desktop.  What kind of desktop? Specifically made to my specs from store parts. . . no brand name computer.  ASUS Motherboard P6X580 Premium.  Now I will probably get hacked!
    I am at my wits end.  And it is frustrating when I need to make a print of something and the system locks up.  I often resort to screen printing to a word document to save in order to reboot. . . .but then I lose all sorts of capabilites when I salvage what I needed.  Also this is a time consumer.
    This printer has served us well for two years and I have expensive cartridges waiting; another two rounds of refills.
    Help?
    Addendum:  I can scan using HP Printer Assistance.  I open the HP Printer assistant, it "retrieves" info from the printer, then I select "scan a document or photo" and the printer responds.   I have no trouble with scanning.
    This question was solved.
    View Solution.

    Hi ArielAce , thanks for getting back to me!
    I would recommend downloading and running the HP Print and Scan Doctor.
    Please keep me posted!
    Please click “Accept as Solution " if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the right to say “Thanks" for helping!
    Jamieson
    I work on behalf of HP
    "Remember, I'm pulling for you, we're all in this together!" - Red Green.

  • Will not print anything but Pdf files!

    If I try to print anything at all other than a PDF file from Adobe only(other readers will not even work) very little of the page prints if anything at all. For example, I was trying to print a shipping label off of the website, and the only thing that would print was the barcode. Nothing else. I actually had to convert it to a pdf file and open it with Adobe, and then it printed perfectly. I have tried reinstalling, restarting, using the HP support doctor, which says absolutely nothing is wrong with my printer. I am at a loss to why it will only print pdf files from Adobe. Can anyone please help me?! I forgot to mention it worked perfectly about a month ago. We don't print a whole lot and didn't notice it was messed up until just a few days ago.

    Hey , Welcome to the HP Support Forums!
    I understand that when printing from your Windows 8.1 computer to your HP Deskjet 1512 All-in-One Printer, nothing is printing, except Adobe PDF files. I would like to assist you today with resolving this issue. Now, you indicate in your post that you had tried to print a shipping label from a website, and only the barcode prints. However, if you open the file up and print it from Adobe it appears to print fine. This leads me to believe that the actual issue that is occuring is a print system issue with the black cartridge. I know it may come as a surprise to hear that as Adobe is printing fine. However, when you print from certain programs on your computer the file is sent to the printer as an 'image' file. If your printer 'thinks' it is printing an image it will use a mixture of colour ink and black to print the black document. Therefore, what you may actually be seeing when you print from Adobe is colour ink mixed. To start troubleshooting I am going to have you print a Quality Diagnostics Report from your printer and this will help us to isolate this printing issue. Please follow the steps below.  How to Print a Quality Report: Load clean, white U.S. Letter or A4 paper in the input tray, if necessary.Press and hold the Power button. While holding down the Power button, press and hold the Cancel button. Hold them both down for 2 or 3 seconds.The test page prints. (1) Printed with the tri-colour cartridge(2) Printed with the black cartridge  If this Report prints perfectly: Then the printing issue that you're experiencing is not being caused by your products print system. Rather, there may be a driver conflict occuring between your Windows computer and your printer. Please do not proceed with troubleshooting at this time.  If this Report prints with missing black or other quality issues: Then the printing issue that you're experiencing is being caused by your products print system. To resolve this hardware issue can I please have you click here. Once the support document opens please choose the Windows 8 dropdown. Next, follow the steps under Solution one, Solution five, Solution six, and Solution seven. This includes any sub steps under the listed Solutions to complete. Once troubleshooting has been completed please print another Quality Diagnostics Report to confirm if the issue has been resolved. Please respond to this post with the result of printing the Quality Diagnostics Report. I look forward to hearing from you!

  • Adobe will not print anything

    Adobe has the absolute worst software on the planet. I’ve already banned it from one computer due to the complete inability to prevent Adobe from performing updates, including attempting to prevent this by altering the registry settings. The problem I am having now makes it appear I’ll have to find another program in order to merely print PDF files as I can’t even do that with my Adobe product.
    I have Adobe X Standard installed on my laptop and just tried to print an already saved PDF file. Adobe doesn’t want to print the file and automatically opens a menu that tries to force me to save the file I already have saved as a PDF. Seriously? For starters, you can’t overwrite an open document so I’d have to save with a new file name, a clearly ludicrous concept.
    In short, Adobe will not print anything on my computer regardless of whether it was saved previously, or is just a document I found on the internet and want to print without saving. What a total waste of money.

    My HP printer is set as 'default', both in my printer settings as well as the program I am trying to print from (CAD program and you have to specify printer).
    Adobe fooled me once and got me to open up my wallet; it won't happen again. Absolute worst software I have had in my 25 years of using computers.

  • Can't print anything other than a test page from the embedded web server

    Hi all
    I have two computers hooked up wirelessly to my HP C410b All in one printer.  One computer works fine and prints everything.  The other one did until this weekend.
    The one printer that will not print will print a test page if I go to the embedded web server and print a test page but if I try to print anything else - even a test page not through the embedded web server - it fails to print.  It does not give an error message it just states print failed.
    The computer shows alerts for the printer like when it runs out of paper or ink so it seems like it's connected but it just won't print.
    I've tried unistalling all the software and printer and reinstalling but it still has the same problem.
    Anyone any ideas???
    Thanks

    What operating system?
    If some version of Windows, download and run this utility: http://h20180.www2.hp.com/apps/Nav?h_pagetype=s-926&h_lang=en&h_client=s-h-e17-1&h_keyword=dg-NDU&ju... 
    Say thanks by clicking "Kudos" "thumbs up" in the post that helped you.
    I am employed by HP

  • HP Officejet J4550 All in one printer Will not print anything no error message

    I had this problem before and was able to talk to a technician and found I had no default printer when he told me how to do that it fixed my problem.  The printer functions like it will print takes paper in but when it comes out it is blank Ink levels are fine ran through all the checks with power and if computer is working ok everything checks out fine.  It just won't print anything on paper.

    '''''"My new printer..."'''''
    For a newly installed printer, you may need to reset some hidden preferences, '''''print.print_printer''''', in particular, for Firefox to recognize the new printer.
    *See --> http://kb.mozillazine.org/Problems_printing_web_pages (''see "Reset printer"'')
    *See --> http://kb.mozillazine.org/About:config
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''
    Not related to your question, but...
    You may need to update some plug-ins. Check your plug-ins and update as necessary:
    *Plug-in check --> http://www.mozilla.org/en-US/plugincheck/
    *Adobe Shockwave for Director Netscape plug-in: [https://support.mozilla.org/en-US/kb/Using%20the%20Shockwave%20plugin%20with%20Firefox#w_installing-shockwave Installing ('''''or Updating''''') the Shockwave plugin with Firefox]
    *'''''Adobe PDF Plug-In For Firefox and Netscape''''': [https://support.mozilla.org/en-US/kb/Using%20the%20Adobe%20Reader%20plugin%20with%20Firefox#w_installing-and-updating-adobe-reader Installing/Updating Adobe Reader in Firefox]
    *Shockwave Flash (Adobe Flash or Flash): [https://support.mozilla.org/en-US/kb/Managing%20the%20Flash%20plugin#w_updating-flash Updating Flash in Firefox]
    *'''''Next Generation Java Plug-in for Mozilla browsers''''': [https://support.mozilla.org/en-US/kb/Using%20the%20Java%20plugin%20with%20Firefox#w_installing-or-updating-java Installing or Updating Java in Firefox]

  • LaserJet Pro Scans, prints test page but will not print from a file

    I installed a LaserJet Pro200 MFP M276nw on my wife's Toshiba Satellite (Windows 7 64Bit OS) laptop yesterday (Printer is brand new out of the box). I installed with a wireless connection. It will print a test page and also scan wirelessly but will not print from a file i.e. a PDF. I installed it on my HP Probook this morning and it works fine. Any suggestions would be appreciated. The thought of paying Geek Squad 75 bucks rubs me the wrong way, especially since i just paid them 100 for an extended warranty. Thanks!

    Welcome to the HP Forums JBottensek,
    I see by your post that the printer won't print a PDF document from the one computer.
    I can help you with this issue.
    I have provided a document to go through the steps which should resolve this issue for not being able to print PDF documents. Cannot Print PDFs from Adobe Reader.
    If you need further assistance, let me know.
    Have a nice day!
    Thank You.
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!
    Gemini02
    I work on behalf of HP

  • Hp Officejet Pro 8500 will print but not anything with black ink. It keeps aligning itself.

    My Hp Officejet Pro 8500 will print but not anything with black ink - i have checked the black ink cartridge and it is full. Whenever i print anything in colour (only option) the printer goes into an alignment/maintenace loop that lasts for a long time and does not fix the problem. What should I do?

    Clean your printerhesd 4-5 times until the black fully restores.  I am on my third complete cleaning and have gone from 0% black to approx. 60-70%.  So, it works just takes time.

  • My 6310 All in One will print a test page but will not print from Publisher, Notepad, etc. WTH?

    My HP 6310 will print a test page fine, but will not print from Publisher, Notepad, etc. It goes thru the motions, but the image printed is almost not there. I have new ink cartridges in it. I have adjusted the print settings. STILL won't print properly. WTH???

    Hm, okay, thanks for getting back to me again!
    Try power cycling the network devices:
    Turn off the printer and computer and unplug the router for 1 minute (do not press any buttons on the router).
    Plug the router back in and wait another minute, next turn on the printer and computer and test print again.
    R a i n b o w 7000I work on behalf of HP
    Click the “Kudos Thumbs Up" at the bottom of this post to say
    “Thanks” for helping!
    Click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution!

  • TS1647 My Macbook Pro will not print anything from any program. I've reinstalled the drivers. I get an error message in Word that says, "Word could not communicate with printer." Any ideas?

    My Macbook Pro will not print anything from any program. I've reinstalled the drivers. I get an error message in Word that says, "Word could not communicate with printer." Any ideas?

    Be sure to try restarting, if you have not done so since this problem occurred.  You should also power off the printer while you do the restart...
    If that does not help, you can try resetting the printing system.  Open System Preferences Print & Scan (or Print & Fax) pane.  In the sidebar with list of printers, right (control) click anywhere.  Select Reset printing system.  You will have to add back your printers after you do this.

  • HT4356 Why can I not print attachments from gmail on my ipad mini, it will print photos and anything from safari

    Why can I not print attachments from gmail on my ipad mini, it will print photos or anything from safari?

    For Gmail attachments, if they are PDF files (as well as many other formats) when you are viewing them on the iPad in Safari there is an option to "Open in iBooks" just below the tab you have open (at the top of the page).
    From iBooks you can print them to a wireless printer easily.
    Hope this helps.

  • My HP Photosmart wireless ePrint will not print anything off my computer....

    It will print a network test and says its connected to my wireless network. A box also will come up on the screen saying printing but then a box comes up that says unable to print. I have tried to restart my comp. I have ink (and paper lol) and nothing has worked. I have ran the trouble shooter as well as the utility tool. This printer is only a month old.... if that.

    I wish I had better news, but if you've gone through all those steps and it didn't resolve the problem, you can replace the printhead and if that doesn't resolve the problem, you'll want to have the printer serviced.
    Here is a link to the doc that walks you through ordering and replacing the printhead:
    http://h10025.www1.hp.com/ewfrf/wc/document?docnam​e=c01763306&cc=us&lc=en&dlc=en&product=3777182&tmp​...
    Say Thanks by clicking the Kudos thumbs up. Please mark the post that solves your problem as an Accepted Solution so other forum users can utilize the solution.
    I am an HP employee.

  • Envy 4507 constantly offline although will print test sheet wirelessly.

    I am using a Mac but I have no idea which OS - it is an old one thoughUsed to print wirelessly without any problems but changed router and now constantly offlineIt will print a test sheet wirelessly but when I then ask for it to print a document it says it is offlineIt is connected to network I have tried putting in IP address manually for printerSpent hours trying to fix the issue and have no idea what to do now 

    The DHCP range is the range of IP addresses the router hands out automatically as devices join the network.  The DHCP range is determined by the router and each brand has a range set at the factory (that can be changed by you).
    Your D-link's DHCP default range is 192.168.0.100 to 192.168.0.199.  So, outside the DHCP range is .2 to .99 and .200 to .254.
    Attached is a handy cheat sheet.
    You can change this range by entering the router's settings page - type the router's IP address into a browser, enter the login info and navigate to the DHCP settings area (varies based on router, hunt around).
    Say thanks by clicking "Kudos" "thumbs up" in the post that helped you.
    I am employed by HP
    Attachments:
    Router Facts.pdf ‏25 KB

  • When I am trying to use my printer with mac it will not print anything and says missing plug???  Help???

    I have usb cord from printer to Mac cannot print anything and says missing plug???  Anyone who can help me?  I do not understand what missing plug means?

    What Mac?
    What Mac OS X?
    What Printer?
    What software are you trying to print from?
    What sort of stuff are you trying to print? {just text, text and some diagrams, graphics, photos, animated Giffs, movies, something else}

Maybe you are looking for