thunderbird / import-export-tools-ng

Import Export Tools that supports Thunderbird 68/78/91/102/115
Other
265 stars 30 forks source link

PDF exports do not use Mozilla Save toPDF settings #528

Open pe4000 opened 5 months ago

pe4000 commented 5 months ago

Dear Christopher Leidigh, the page format of the exported A4 pdf is 215.9x279.4mm instead of 210x297 mm. Where can I change this? Best regards, Peter

cleidigh commented 5 months ago

@pe4000 IETNG does not control any of these settings. My only guess is there is an error for A4 in the Mozilla pdf driver.

I would try to manually change thepaper_height and width in Advanced Settings

print.printer_Mozilla_Save_to_PDF.print_paper_height    11.6929133858268    
print.printer_Mozilla_Save_to_PDF.print_paper_id    iso_a4  
print.printer_Mozilla_Save_to_PDF.print_paper_size_unit 0   
print.printer_Mozilla_Save_to_PDF.print_paper_width 8.26771653543307    

Your defaults will probably be metric. I don't know if your changes will stick @cleidigh

pe4000 commented 5 months ago

Thank you for the quick reply.

This problem only occurs in connection with the with the ImportExportToolsNG extension (but not with the extension PrintingTools NG) I have set print.printer_Mozilla_Save_to_PDF.print_paper_size_unit to 1 in the configuration and also set the height and width parameters to the dimensions of A4. All without success. The page size is still 215.9 x 279.4 mm. I am afraid to change the parameters: extensions.importexporttoolsng. ... to change anything, because I don't know my way around here. I also don't know how to reset them to the original status ("factory settings") could be reset.

Perhaps there is a solution after all, as the ImportExportToolsNG extension otherwise works well, except for the export of the email with attachment to pdfs with attachment.

cleidigh commented 5 months ago

@pe4000 There are differences in how PrintingTools deals with the print drivers. But, in both cases the page size definitions all come from the drivers so I am very confused by the discrepancy you see. Also I have never been able to replicate a metric environment no matter what I do with regional settings etc. So debugging has always been difficult. I will try one thing when I have the chance. @cleidigh

pe4000 commented 5 months ago

Thank you for your kind reply.

My metric settings: print.printer_Mozilla_Save_to_PDF.print_paper_height | 297.000 |   print.printer_Mozilla_Save_to_PDF.print_paper_id | iso_a4 print.printer_Mozilla_Save_to_PDF.print_paper_size_unit | 1 print.printer_Mozilla_Save_to_PDF.print_paper_width | 210.000

On another computer in the household we have inch settings. In both cases the the page format of the exported A4 pdf is 215.9x279.4mm instead of 210x297 mm.

Since it works with the printing tools extension, the problem is not primary

Best regards, Peter

cleidigh commented 4 months ago

@pe4000 Peter I'm so daft, I should have converted your dimensions to English units before! 215.9x279.4mm is exactly 8.5" x 11", That's US Letter size.

A long time ago the pdf settings were done in a way that initialized to a generic default that uses US Letter. While I do all sorts of stuff in PrintingTools, I never really did much in ImportExportTools concerning PDF. I'm actually surprised you are the first to find this, so thanks!

So now PDF output will follow the last Save to PDF settings. Hopefully does the trick, works on my setup.

https://github.com/thunderbird/import-export-tools-ng/blob/v14.0.2/xpi/beta/import-export-tools-ng-14.0.2-b9-tb.xpi

Christopher

pe4000 commented 4 months ago

Dear Christopher, thank you for your efforts for the pdf export, which I use exclusively so far. Best regards, Peter

cleidigh commented 4 months ago

@pe4000 Did b9 beta solve the issue with A4 dimensions? @cleidigh

pe4000 commented 4 months ago

With version of the extension import-export-tools-ng → import-export-tools-ng-14.0.2-b9-tb.xpi the problem no longer occurs. The page size is now 21.03*29.70cm. Thanks! It would be perfect if the email attachment would be also included in the pdf attachment. With regards, peter

cleidigh commented 4 months ago

@pe4000 Ok, good. The inclusion is a tricky issue, especially since only text and pdf could potentially be included. @cleidigh

pe4000 commented 4 months ago

Hello Christopher, I think that Thunderbird files of different file formats from the email attachment can easily be inserted into the attachment of the exported pdf. This works well manually - it would be nice if this could be automated - like with Outlook + Adobe acrobat (as default printer) Greetings, Peter

Here an example: 20240221 Pdf mit Anhang - 2

pe4000 commented 3 months ago

Thank you!