Index  | Recent Threads  | List Attachments  | Search
 Welcome Guest  |  Register  |  Login
Login Name  Password
 

Sweet Home 3D Forum



No member browsing this thread
Thread Status: Active
Total posts in this thread: 3
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 3662 times and has 2 replies Next Thread
hassenius
Newbie




Joined: Oct 13, 2014
Post Count: 2
Status: Offline
Reply to this Post  Reply with Quote 
Fail to print to PDF in Ubuntu 14.04

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
[Oct 13, 2014, 11:42:51 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9427
Status: Offline
Reply to this Post  Reply with Quote 
Re: Fail to print to PDF in Ubuntu 14.04

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:
‑Dcom.eteks.sweethome3d.swing.fixedPrintMargin=0.2
for a 0.2 cm margin.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
[Oct 14, 2014, 2:51:30 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
hassenius
Newbie




Joined: Oct 13, 2014
Post Count: 2
Status: Offline
Reply to this Post  Reply with Quote 
Re: Fail to print to PDF in Ubuntu 14.04

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!
[Oct 14, 2014, 9:51:34 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
[ Jump to Last Post ]
Show Printable Version of Thread  Post new Thread

  Get Sweet Home 3D at SourceForge.net. Fast, secure and Free Open Source software downloads  
© Copyright 2024 Space Mushrooms - All rights reserved