Fail to print to PDF in Ubuntu 14.04

This topic has been viewed 3909 times and has 2 replies
Thread status: Active
Still a problem with your graphic card? [img]http://www.sweethome3d.com/images/flags/en_small.gif[/img]
Post Reply New Topic
hassenius
Posts: 2
Joined: Mon Oct 13, 2014 11:37 pm

Fail to print to PDF in Ubuntu 14.04

Post by hassenius »

Hey,

Installed SweetHome3D from Ubuntu Repos.
When trying to print to PDF in Ubuntu 14.04 an empty PDF is generated.
When launching from command line, I can see this Java error:
java.lang.RuntimeException: java.awt.print.PrinterException: Width of printable area is too small.
at com.eteks.sweethome3d.swing.HomePrintableComponent.getPageCount(Unknown Source)
at com.eteks.sweethome3d.swing.HomePDFPrinter.write(Unknown Source)
at com.eteks.sweethome3d.swing.HomePane.printToPDF(Unknown Source)
at com.eteks.sweethome3d.viewcontroller.HomeController$43.call(Unknown Source)
at com.eteks.sweethome3d.viewcontroller.HomeController$43.call(Unknown Source)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at com.eteks.sweethome3d.viewcontroller.ThreadedTaskController$1.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.awt.print.PrinterException: Width of printable area is too small.
at javax.swing.TablePrintable.print(TablePrintable.java:214)
at com.eteks.sweethome3d.swing.FurnitureTable.print(Unknown Source)
at com.eteks.sweethome3d.swing.FurnitureTable.access$300(Unknown Source)
at com.eteks.sweethome3d.swing.FurnitureTable$12.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:302)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)


I've tried updating the Java stuffs as suggested in FAQ re OffScreenSupport:
JAVA_ARGS="-Djava.library.path=/usr/lib/jni \
-Dcom.eteks.sweethome3d.applicationFolders=$HOME/.eteks/sweethome3d:/usr/share/sweethome3d \
-Dcom.eteks.sweethome3d.j3d.checkOffScreenSupport=false"

No idea where to look next.
Any suggestions?

//hk
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: Fail to print to PDF in Ubuntu 14.04

Post by Puybaret »

If setting a customized size paper with your own margins in page setup doesn't work, you could try to set the com.eteks.sweethome3d.swing.fixedPrintMargin property that was added in version 4.1. In SweetHome3D command line or your JAVA_ARGS var, simply add the option:

Code: Select all

‑Dcom.eteks.sweethome3d.swing.fixedPrintMargin=0.2
for a 0.2 cm margin.
Emmanuel Puybaret, Sweet Home 3D creator
hassenius
Posts: 2
Joined: Mon Oct 13, 2014 11:37 pm

Re: Fail to print to PDF in Ubuntu 14.04

Post by hassenius »

Sweet,

Went in and fiddled randomly with the page settings, and now it's generating the PDF no problem.
Don't actually think I changed anything, but happy it works now!

Thanks a mill!
Post Reply New Topic

Who is online

Users browsing this forum: No registered users and 1 guest