Download

Online

Gallery

Blog

  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: 16
Posts: 16   Pages: 2   [ Previous Page | 1 2 ]
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 17672 times and has 15 replies Next Thread
locofocos
Newbie



United States
Joined: Jan 12, 2020
Post Count: 2
Status: Offline
Reply to this Post  Reply with Quote 
Re: Print to Scale to PDF without Pagination

I've been desperately trying to get a scaled PDF in a large size. I've tried across my Windows, Ubuntu, and Mac system, and none of those are letting me set a custom page size for PDF export. I also tried gabeblack's suggestion above.

One thing that mostly worked is the "Export to SVG" option, plus careful measuring and manual tweaking in GIMP. That got something pretty close, but it's maybe 1 percent off after printing on the large-scale printer at Kinko's.

I'd like to propose another option. I found that I can make some code tweaks locally and get the desired PDF I want. I had to modify PageSetupPanel.updateController() and hardcode the desired width, height, and margins I want for the values being passed into HomePrint. Then in HomePrintableComponent, I had to comment out the call to "printerJob.validatePage(pageFormat)". After doing that, I have a lovely PDF in the exact size I need. Here's the "poor man's" gist if anyone wants it. Download the source code, make these changes, built it according to README.TXT, and profit. https://gist.github.com/locofocos/362566f0119a68664a3da115aa2d2a80

I think it would make a ton of sense to add a few input elements here to allow end users to do this. In the PageSetupPanel, we could have an option "Override page width/height/margins". Then we could add an additional checkbox, "Force override (if override doesn't work". That boolean property would be put into the HomePrint object, then if that's set to true, skip the call to "printerJob.validatePage(pageFormat)" later on.

I think this would add a lot of value to this program, for people using it to design homes who want an accurate scaled PDF.
[Mar 23, 2020, 1:06:13 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
hansmex
Advanced Member
Member's Avatar

Netherlands
Joined: Sep 26, 2009
Post Count: 3948
Status: Offline
Reply to this Post  Reply with Quote 
Re: Print to Scale to PDF without Pagination

I fully agree!
----------------------------------------
Hans

new website - under constuction
hansdirkse.info
[Mar 23, 2020, 3:40:00 AM] 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: 9141
Status: Offline
Reply to this Post  Reply with Quote 
Re: Print to Scale to PDF without Pagination

In case you didn't notice, you can already force a given margin by setting the system property com.eteks.sweethome3d.swing.fixedPrintMargin to a value in mm (see the article about version 4.1).
The page size itself should be managed by the printer driver, shouldn't it?
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Mar 23, 2020, 9:09:38 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
hansmex
Advanced Member
Member's Avatar

Netherlands
Joined: Sep 26, 2009
Post Count: 3948
Status: Offline
Reply to this Post  Reply with Quote 
Re: Print to Scale to PDF without Pagination

Recently I tried to print a plan on A3 paper. First I did a test-print (scale 1:100) on A4. Satisfied, I scaled up to A3.
Although there should have been more than enough space on the paper, the program cut the plan in two and divided both halves over two sheets of A3.

So, there is room for improvement, unless of course I am doing something wrong.

H
----------------------------------------
Hans

new website - under constuction
hansdirkse.info
[Mar 23, 2020, 10:38:52 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
tillwill
Newbie



United States
Joined: May 17, 2021
Post Count: 1
Status: Offline
Reply to this Post  Reply with Quote 
Re: Print to Scale to PDF without Pagination

I've been desperately trying to get a scaled PDF in a large size. I've tried across my Windows, Ubuntu, and Mac system, and none of those are letting me set a custom page size for PDF export. I also tried gabeblack's suggestion above.

One thing that mostly worked is the "Export to SVG" option, plus careful measuring and manual tweaking in GIMP. That got something pretty close, but it's maybe 1 percent off after printing on the large-scale printer at Kinko's.

I'd like to propose another option. I found that I can make some code tweaks locally and get the desired PDF I want. I had to modify PageSetupPanel.updateController() and hardcode the desired width, height, and margins I want for the values being passed into HomePrint. Then in HomePrintableComponent, I had to comment out the call to "printerJob.validatePage(pageFormat)". After doing that, I have a lovely PDF in the exact size I need. Here's the "poor man's" gist if anyone wants it. Download the source code, make these changes, built it according to README.TXT, and profit. https://gist.github.com/locofocos/362566f0119a68664a3da115aa2d2a80

I think it would make a ton of sense to add a few input elements here to allow end users to do this. In the PageSetupPanel, we could have an option "Override page width/height/margins". Then we could add an additional checkbox, "Force override (if override doesn't work". That boolean property would be put into the HomePrint object, then if that's set to true, skip the call to "printerJob.validatePage(pageFormat)" later on.

I think this would add a lot of value to this program, for people using it to design homes who want an accurate scaled PDF.

Thank you for the cod, it really helped with the issue I had.
[May 17, 2021, 6:24:07 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
bert.struik
Member
Member's Avatar

Canada
Joined: Apr 24, 2015
Post Count: 30
Status: Offline
Reply to this Post  Reply with Quote 
Re: Print to Scale to PDF without Pagination

It seems like Sweethome uses one of the existing printer drivers on the user's computer to control a plot.I only have a letter size page printer. I do not know how to install a roll plotter driver in linux without having the plotter attached to the computer. I must not understand something about this.

It seems that having a generic roll plotter driver as part of Sweethome would permit choices of paper size for a pdf plot, without each individual having their own plotter driver. Since I do not know how this works this could be a stupid suggestion.

LibreCAD somehow provides the parameters to print a PDF to any standard plotter size. Maybe the coding could be shared?

Obviously not being able to contribute to the coding or whatever needed to help make this happen I am just hoping someone else has the capability and time.
[Jan 10, 2022, 12:44:39 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Posts: 16   Pages: 2   [ Previous Page | 1 2 ]
[ 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 2006-2024 eTeks - All rights reserved