Create PDF from an Excel file without white margins
Hire the world's top talent on demand or became one of them at Toptal: https://topt.al/25cXVn
and get $2,000 discount on your first invoice
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Breezy Bay
--
Chapters
00:00 Create Pdf From An Excel File Without White Margins
00:32 Accepted Answer Score 7
00:55 Answer 2 Score 0
01:59 Answer 3 Score 0
02:16 Thank you
--
Full question
https://superuser.com/questions/1064214/...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#microsoftexcel #pdf
#avk47
ACCEPTED ANSWER
Score 7
After thousand of tries, i foud a way:
I set all the margins to 0 (Page Layout > Margins > 0 all) and then i printed with the native Windows PDF printer: "Microsoft Print To PDF".
I didn“t even knew windows came with a native pdf printer but that solved my problem.
ANSWER 2
Score 0
Using the "Microsoft Print To PDF" printer resolves the issue for printed document. However, I wanted to "Save (my document) to PDF" so the text is embedded and could be copied.
Also, the "Print to PDF" command cannot be automated using a Macro (or at least I couldn't figure out how), while the "Save to PDF" command is widely documented and allows to predetermine the path and filename using a cell value.
Like mentioned in the previous comments, all page margins should be set to 0. Also, in the Page Setup > Header/Footer, both "Scale with document" and "Align with page margins" boxes should be checked.
At this point, if you Save to PDF your document, the white bleed lines should still occur in your newly created PDF document.
All you need to do at this point is to print your document using "Microsoft Print To PDF", complete the whole process and your printed/saved document should be OK.
Now, go back using the "Save to PDF" command (either in the menu ribbon or using VBA Macro) and your saved document should be ok.
I'm using Microsoft Office 2013 on Windows 10.
ANSWER 3
Score 0
I encountered the same issue and fixed it by going to:
File > Options > Advanced > General (section) > and unticking Scale content for A4.
Should be find as long as you have your page sizes formatted correctly.