United States
Joined: Jan 12, 2020
Post Count: 2
Status:
Offline
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.
France
Joined: Nov 7, 2005
Post Count: 9420
Status:
Offline
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 creator
Netherlands
Joined: Sep 26, 2009
Post Count: 3991
Status:
Offline
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.
United States
Joined: May 17, 2021
Post Count: 1
Status:
Offline
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.
Canada
Joined: Apr 24, 2015
Post Count: 30
Status:
Offline
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.
Joined: Jun 24, 2010
Post Count: 6
Status:
Offline
Re: Print to Scale to PDF without Pagination
I'd like to re-open this thread as I have the same issue - I want to output a PDF in size a0. I have seen in this thread the suggestion of using the Microsoft XPS printer but I can't see how to change the page size there. I have installed PDF Architect where I can change the page size to A0, but Sweethome still paginates the output as if it was printing to A3. Can anyone help me through with the exact steps to get Sweethome to "understand" A0. I am running on Windows 10 v22H2.
Netherlands
Joined: Apr 8, 2022
Post Count: 1248
Status:
Offline
Re: Print to Scale to PDF without Pagination
Your problem is not Sweet Home 3D but a pdf printer driver that is not capable of what you want. You will notice that if you read this thread: https://www.sweethome3d.com/support/forum/viewthread_thread,12937_offset,0 Find another pdf printer and try the suggestions in the thread.
---------------------------------------- Dodecagon.nl 950+ 3D models, manuals, and projects
Joined: Jun 24, 2010
Post Count: 6
Status:
Offline
Re: Print to Scale to PDF without Pagination
I found to make this work I had to set my pdf printer to be the default Windows printer, it wasn't sufficient to select it at the time. Hope that helps others in the future.