Same problem exist using jscript "xdocument.view.export" but the output unsing the "PDF" parameter is NOT exaclty the same as the output from the UI using File - Export.
File - Export to hmt (web) seems to produce the "best looking" output.
Output to pdf is eratic from both the UI and xdocument just as you describe, margins, page size, pages breaks, page orientation, ect. do not correspond to the print view properties, but printing to a file using a pdf print driver like CutePdf or others properly distills the print view and does use the print view properties.
Between the UI and xdocument functions there's an interesting matrix of functionality. The UI has Export to pdf, xps, and mht. Output goes to the local file system. Right? Xdocument has output to pdf and xps that can be directed to a SharePoint library, but mht can only be directedf to the local file system. Plus it appears that the code base behind this functionality differs as a function of UI vs xdocument execution which is a reasonable inference in that the output differs.
As far as we can tell there isn't a solution to this without a Studio do-it-yourself project. We may take that on but I'd appreciate knowing if any of the above is wrong, and InfoPath can be configured to produce a properly distilled pdf into a SharePoint library.
Thanks .