Not sure if this will make any difference, this is a stripped down version of my PDF plotting, - check it works first with a standard PDF plot maybe? then change to what you want.
I have a little function for each pdf setting - below they are just values but would be things like client specific stuff, company styles and so on, then these are set to variables which is what most of this is. Look through for 'Change this bit here' as what to change for your PDFs. Note that there are 2 PDF plotters set, I use one to do a plot preview and one that doesn't - you'll need to change both to your Foxit plotter.
Anyway, if this works for you it is a basis to do all the other stuff that you might want - just go to each sub function to adjust as you need.
(defun c:pdfplot ( / ) ;; NOTE: Variables not set
;; Sub functions
(defun PDFgetdetailedplotconfiguration ( / dpc) (setq dpc "Yes") dpc)
(defun PDFgetlayoutname ( / lname) (setq lname (getvar "ctab")) lname )
;;;;;;;;;;;;;;;;;;;;;;
;;Change this bit here
(defun PC3Name ( / ) "DWG to PDF.pc3" ) ; plotter setting with preview
;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;
;;Change this bit here
(defun PC3NameNP ( / ) "DWG to PDF no Preview.pc3" ) ; No preview plotter setting
;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;
;;Change this bit here
(defun PDFgetpapersize ( / ) (setq papersize "ISO expand A0 (841.00 x 1189.00 MM)") )
;;;;;;;;;;;;;;;;;;;;;;
(defun PDFgetpaperunits ( / pu) (setq pu "") pu)
(defun PDFGetPageOrientation ( / ) (setq pageorientation "L") pageorientation)
(defun PDFgetorientation ( / orientation) (setq orientation "landscape") orientation)
(defun PDFgetplotupsidedown ( / plud) (setq plud "N") plud)
(defun PDFgetplotarea ( / pla) (setq pla "Extents") pla) ;;Extents, Display, Limits, View
(defun PDFgetplotscale ( / pls) (setq pls "Fit") pls)
(defun PDFgetplotoffset ( / plo) (setq plo "Center") plo)
(defun PDFgetplotwithplotstyles ( / plwpls) (setq plwpls "Y") plwpls)
;;;;;;;;;;;;;;;;;;;;;;
;;Change this bit here
(defun PDFgetplotstyletablename ( / plstname) (setq plstname "acad.ctb") plstname)
;;;;;;;;;;;;;;;;;;;;;;
(defun PDFgetplotwithlineweights ( / plwlw) (setq plwlw "Y") plwlw)
(defun PDFgetshadeplotsetting ( / spls) (setq spls "As Displayed") spls )
(defun PDFgetfullpath ( / fp)
(if (= (getvar 'dwgtitled) 1)(setq fp (getvar "dwgprefix"))) ;;drawing saved
(if (= (getvar 'dwgtitled) 0)(setq fp (strcat (PDFgetDesktop) "\\"))) ;;drawing not saved
fp
)
(defun PDFgetDesktop ( / script spFolders desktop) ;;gets the location of the desktop
(cond (
(setq script (vlax-create-object "WScript.Shell"))
(setq spFolders (vlax-get-property script "SpecialFolders")
desktop (vlax-invoke-method spFolders 'Item "Desktop")
)
(vlax-release-object spFolders)
(vlax-release-object script)
))
desktop
)
(defun PDFgetfilename ( / myfnloc myfn myf) ;; check in here if PDF file to write to is open
(setq myfnloc (PDFgetfullpath))
(setq myfn (vl-filename-base (getvar 'dwgname)))
(setq myf (strcat myfnloc myfn ".pdf"))
myfn
)
(defun PDFgetsaveplotsettings ( / savepls) (setq savepls "N") savepls )
(defun PDFgetproceedwithplot ( / pwpl) (setq pwpl "Y") pwpl )
(defun PDFgetplottername ( pdfpreview / pname)
;;;;pname this needs to be set up in pagesetup settings ;;;;
;;;;;;;;;;;;;;;;;;;;;;
;;Change this bit here
(setq pname "DWG to PDF.pc3") ;;Default DWG to PDF plotter
;;;;;;;;;;;;;;;;;;;;;;
(if (findfile (setq PC3FilePath (strcat (PC3Loc) "\\" (PC3Name))) ) (setq pname (PC3Name)) );;end if
(if (= pdfpreview "N") ;; plotter setting with no preview
(if (findfile (setq PC3FilePath (strcat (PC3Loc) "\\" (PC3NameNP))) ) (setq pname (PC3NameNP)) );;end if
);;end if
pname
)
;;End of sub functions
(setq detailedplotconfiguration (PDFgetdetailedplotconfiguration))
(setq layoutname (PDFgetlayoutname))
(setq pdfpreview "N")
(setq plottername (PDFgetplottername pdfpreview))
(setq papersize (PDFgetpapersize)) ;;drawing paper size...not plotting size if different
(setq paperunits (PDFgetpaperunits))
(setq orientation (PDFgetorientation))
(setq plotupsidedown (PDFgetplotupsidedown))
(setq plotarea (PDFgetplotarea))
(setq plotscale (PDFgetplotscale))
(setq plotoffset (PDFgetplotoffset))
(setq plotwithplotstyles (PDFgetplotwithplotstyles))
(setq plotstyletablename (PDFgetplotstyletablename))
(setq plotwithlineweights (PDFgetplotwithlineweights))
(setq shadeplotsetting (PDFgetshadeplotsetting))
(setq fullpath (PDFgetfullpath))
(setq myfilename (PDFgetfilename))
(setq filepathname (strcat fullpath myfilename ".pdf"))
(setq saveplotsettings (PDFgetsaveplotsettings))
(setq proceedwithplot (PDFgetproceedwithplot))
;; Do plotting
;;Plot model space
(if (= (getvar "TILEMODE") 1) ;;model space plot
(progn
(if (= (ssget "_x" '((410 . "Model"))) nil) ;;check if there are any objects to plot
(progn
(alert "-CANCELLING-\nThe drawing is blank")
(exit)
) ; end progn
) ; end if
(if (= plotarea "window")
(command "-plot" detailedplotconfiguration layoutname plottername papersize paperunits orientation plotupsidedown plotarea pause pause plotscale plotoffset plotwithplotstyles plotstyletablename plotwithlineweights shadeplotsetting filepathname saveplotsettings proceedwithplot)
) ; end if 'window'
(if (/= plotarea "window")
(command "-plot" detailedplotconfiguration layoutname plottername papersize paperunits orientation plotupsidedown plotarea plotscale plotoffset plotwithplotstyles plotstyletablename plotwithlineweights shadeplotsetting filepathname saveplotsettings proceedwithplot)
) ; end if
) ; end progn
) ; end if modelspace
;;Plot paper space
(if (= (getvar "TILEMODE") 0)
(progn
(if (= plotarea "window")
(command "-plot" detailedplotconfiguration layoutname plottername papersize paperunits orientation plotupsidedown plotarea pause pause plotscale plotoffset plotwithplotstyles plotstyletablename plotwithlineweights "" "" "" filepathname saveplotsettings proceedwithplot)
)
(if (= plotarea "extents")
(command "zoom" "all" "zoom" ".95x") ;; Zoom screen, just because
(command "-plot" detailedplotconfiguration layoutname plottername papersize paperunits orientation plotupsidedown plotarea plotscale plotoffset plotwithplotstyles plotstyletablename plotwithlineweights "" "" "" filepathname saveplotsettings proceedwithplot)
) ; end if
) ; end progn
) ; end if paperspace
(princ) ; exit quietly
)