Re: Printing an existing PDF File in Windows 10
@Tim, one problem with those non-Adobe solutions is compatibility. Depending on the type/contents of your PDF’s, those non-Adobe alternatives may not handle them well. In my case I'm dealing mostly with PDFs that contain images, and no text at all. In my experience those non-Adobe alternatives did not render my pdfs properly. So, if possible I’d stick with Adobe Reader. julio > On May 6, 2019, at 4:54 PM, Tim Nevels via 4D_Tech <4d_tech@lists.4d.com> > wrote: > > On May 6, 2019, at 2:00 PM, Doug Cottril wrote: > >> Julio & all >> >> That does indeed, work. However, the SW_Hide parameter does not seem to >> suppress the print >> dialogs. Since I actually need to print multiple documents at once, the >> user does not want to >> press the print button after every page (and there could be 50+ pages, so I >> don’t blame them) >> >> I’ll read the docs a bit and the resource Chip posted, but if anyone has >> beat their head against >> this wall before and either has a solution, or knows there isn’t one, I’d >> appreciate hearing >> about it. > > You appear to have several options: > > PDFtoPrinterhttp://www.columbia.edu/~em36/pdftoprinter.html Have not > used it, just found it with Google. > > Foxit Readerhttps://www.foxitsoftware.com/pdf-reader/Have not used > it, just found it with Google. > > Acrobat Reader using “officially undocumented” command line interface. This > is the one I built and used many years ago. Not sure if it still works in the > current version of Acrobat Reader. You will have to test it to see if it > still works. > > Here is some sample code initially written back in 2007. Yikes!! But you can > see it supports Acrobat Reader from version 5.0 to 10.0. But you will get the > docs on the command line parameters. (I found this doing Google searches long > time ago.) > > // === > // PROJECT METHOD: ExpenseReport_PrintReceipts > > // PARAMETERS: $1 = full path to PDF file to print > > // DESCRIPTION: Called form PrintExpenseReport method to print a PDF file > // of receipts. > > // This method uses the partially documented -- and unsupported -- way of > getting > // Adobe Reader to print a PDF file without displaying print dialogs to the > user. > > // Command Line Parameters: > // /p = displays the Print Dialog box (but my testing shows it does > not always show dialog box) > // /t = prints without dialog box (but you need to also include the > printer name parameter) > // /n = Launches a separate instance of Acrobat or Adobe Reader, even > if one is currently open. > // /s = Opens Acrobat or Adobe Reader, suppressing the splash screen. > // /o = Opens Acrobat or Adobe Reader, suppressing the open file dialog. > // /h = Opens Acrobat or Adobe Reader in a minimized window. > > // CREATED BY: Tim Nevels, Innovative Solutions ©2007 > // DATE: 9/20/2007 > // LAST MODIFIED: > // > > C_TEXT($1;$documentPath_t) > $documentPath_t:=$1 > > $OKtoContinue_b:=True > > If (<>MacOS) > Msg ("Printing receipt PDF files is currently not supported for Mac OS > X.") > $OKtoContinue_b:=False > End if > > // get path to Adobe Reader > If ($OKtoContinue_b) > $adobeReaderProgramPath_t:="C:\\Program Files\\Adobe\\Reader > 10.0\\Reader\\AcroRd32.exe" > If (Test path name($adobeReaderProgramPath_t)#Is a document) > $adobeReaderProgramPath_t:="C:\\Program Files\\Adobe\\Reader > 9.0\\Reader\\AcroRd32.exe" > If (Test path name($adobeReaderProgramPath_t)#Is a document) > $adobeReaderProgramPath_t:="C:\\Program > Files\\Adobe\\Reader 8.0\\Reader\\AcroRd32.exe" > If (Test path name($adobeReaderProgramPath_t)#Is a > document) > $adobeReaderProgramPath_t:="C:\\Program > Files\\Adobe\\Reader 7.0\\Reader\\AcroRd32.exe" > If (Test path > name($adobeReaderProgramPath_t)#Is a document) > $adobeReaderProgramPath_t:="C:\\Program > Files\\Adobe\\Acrobat 7.0\\Acrobat\\Acrobat.exe" > If (Test path > name($adobeReaderProgramPath_t)#Is a document) > > $adobeReaderProgramPath_t:="C:\\Program Files\\Adobe\\Acrobat > 5.0\\Acrobat\\Acrobat.exe" > If (Test path > name($adobeReaderProgramPath_t)#Is a document) > Msg ("ERROR: Unable to > locate Adobe Reader application."+<>CR+<>CR+"Please locate the program.") > $docRef:=Open > document("";"APPL";Get pathname) > If (OK=1) > >
Re: Printing an existing PDF File in Windows 10
Thanks Tim, I’ll take a look at each of these options. Much appreciated! DKC > On May 6, 2019, at 3:54 PM, Tim Nevels via 4D_Tech <4d_tech@lists.4d.com> > wrote: > > On May 6, 2019, at 2:00 PM, Doug Cottril wrote: > >> Julio & all >> >> That does indeed, work. However, the SW_Hide parameter does not seem to >> suppress the print >> dialogs. Since I actually need to print multiple documents at once, the >> user does not want to >> press the print button after every page (and there could be 50+ pages, so I >> don’t blame them) >> >> I’ll read the docs a bit and the resource Chip posted, but if anyone has >> beat their head against >> this wall before and either has a solution, or knows there isn’t one, I’d >> appreciate hearing >> about it. > > You appear to have several options: > > PDFtoPrinterhttp://www.columbia.edu/~em36/pdftoprinter.html Have not > used it, just found it with Google. > > Foxit Readerhttps://www.foxitsoftware.com/pdf-reader/Have not used > it, just found it with Google. > > Acrobat Reader using “officially undocumented” command line interface. This > is the one I built and used many years ago. Not sure if it still works in the > current version of Acrobat Reader. You will have to test it to see if it > still works. > > Here is some sample code initially written back in 2007. Yikes!! But you can > see it supports Acrobat Reader from version 5.0 to 10.0. But you will get the > docs on the command line parameters. (I found this doing Google searches long > time ago.) > > // === > // PROJECT METHOD: ExpenseReport_PrintReceipts > > // PARAMETERS: $1 = full path to PDF file to print > > // DESCRIPTION: Called form PrintExpenseReport method to print a PDF file > // of receipts. > > // This method uses the partially documented -- and unsupported -- way of > getting > // Adobe Reader to print a PDF file without displaying print dialogs to the > user. > > // Command Line Parameters: > // /p = displays the Print Dialog box (but my testing shows it does > not always show dialog box) > // /t = prints without dialog box (but you need to also include the > printer name parameter) > // /n = Launches a separate instance of Acrobat or Adobe Reader, even > if one is currently open. > // /s = Opens Acrobat or Adobe Reader, suppressing the splash screen. > // /o = Opens Acrobat or Adobe Reader, suppressing the open file dialog. > // /h = Opens Acrobat or Adobe Reader in a minimized window. > ** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
Re: Printing an existing PDF File in Windows 10
On May 6, 2019, at 2:00 PM, Doug Cottril wrote: > Julio & all > > That does indeed, work. However, the SW_Hide parameter does not seem to > suppress the print > dialogs. Since I actually need to print multiple documents at once, the user > does not want to > press the print button after every page (and there could be 50+ pages, so I > don’t blame them) > > I’ll read the docs a bit and the resource Chip posted, but if anyone has beat > their head against > this wall before and either has a solution, or knows there isn’t one, I’d > appreciate hearing > about it. You appear to have several options: PDFtoPrinterhttp://www.columbia.edu/~em36/pdftoprinter.html Have not used it, just found it with Google. Foxit Readerhttps://www.foxitsoftware.com/pdf-reader/Have not used it, just found it with Google. Acrobat Reader using “officially undocumented” command line interface. This is the one I built and used many years ago. Not sure if it still works in the current version of Acrobat Reader. You will have to test it to see if it still works. Here is some sample code initially written back in 2007. Yikes!! But you can see it supports Acrobat Reader from version 5.0 to 10.0. But you will get the docs on the command line parameters. (I found this doing Google searches long time ago.) // === // PROJECT METHOD: ExpenseReport_PrintReceipts // PARAMETERS: $1 = full path to PDF file to print // DESCRIPTION: Called form PrintExpenseReport method to print a PDF file // of receipts. // This method uses the partially documented -- and unsupported -- way of getting // Adobe Reader to print a PDF file without displaying print dialogs to the user. // Command Line Parameters: // /p = displays the Print Dialog box (but my testing shows it does not always show dialog box) // /t = prints without dialog box (but you need to also include the printer name parameter) // /n = Launches a separate instance of Acrobat or Adobe Reader, even if one is currently open. // /s = Opens Acrobat or Adobe Reader, suppressing the splash screen. // /o = Opens Acrobat or Adobe Reader, suppressing the open file dialog. // /h = Opens Acrobat or Adobe Reader in a minimized window. // CREATED BY: Tim Nevels, Innovative Solutions ©2007 // DATE: 9/20/2007 // LAST MODIFIED: // C_TEXT($1;$documentPath_t) $documentPath_t:=$1 $OKtoContinue_b:=True If (<>MacOS) Msg ("Printing receipt PDF files is currently not supported for Mac OS X.") $OKtoContinue_b:=False End if // get path to Adobe Reader If ($OKtoContinue_b) $adobeReaderProgramPath_t:="C:\\Program Files\\Adobe\\Reader 10.0\\Reader\\AcroRd32.exe" If (Test path name($adobeReaderProgramPath_t)#Is a document) $adobeReaderProgramPath_t:="C:\\Program Files\\Adobe\\Reader 9.0\\Reader\\AcroRd32.exe" If (Test path name($adobeReaderProgramPath_t)#Is a document) $adobeReaderProgramPath_t:="C:\\Program Files\\Adobe\\Reader 8.0\\Reader\\AcroRd32.exe" If (Test path name($adobeReaderProgramPath_t)#Is a document) $adobeReaderProgramPath_t:="C:\\Program Files\\Adobe\\Reader 7.0\\Reader\\AcroRd32.exe" If (Test path name($adobeReaderProgramPath_t)#Is a document) $adobeReaderProgramPath_t:="C:\\Program Files\\Adobe\\Acrobat 7.0\\Acrobat\\Acrobat.exe" If (Test path name($adobeReaderProgramPath_t)#Is a document) $adobeReaderProgramPath_t:="C:\\Program Files\\Adobe\\Acrobat 5.0\\Acrobat\\Acrobat.exe" If (Test path name($adobeReaderProgramPath_t)#Is a document) Msg ("ERROR: Unable to locate Adobe Reader application."+<>CR+<>CR+"Please locate the program.") $docRef:=Open document("";"APPL";Get pathname) If (OK=1) $adobeReaderProgramPath_t:=Document Else $adobeReaderProgramPath_t:="" End if End if End if End if End if End if End if If ($adobeReaderProgramPath_t="") Msg ("ERROR: Unable to print Receipts PDF file. The Adobe Reader application could not"+" be
Re: Printing an existing PDF File in Windows 10
Julio & all That does indeed, work. However, the SW_Hide parameter does not seem to suppress the print dialogs. Since I actually need to print multiple documents at once, the user does not want to press the print button after every page (and there could be 50+ pages, so I don’t blame them) I’ll read the docs a bit and the resource Chip posted, but if anyone has beat their head against this wall before and either has a solution, or knows there isn’t one, I’d appreciate hearing about it. Thanks again, DKC > On May 6, 2019, at 2:39 PM, Julio Carneiro via 4D_Tech <4d_tech@lists.4d.com> > wrote: > > Sorry Doug, my fault. I should have indicated that you need to use Win32API > “sys_ShellExecute”, instead of 4D’s LEP. > > In your case something like this should do the job: > $x:=sys_ShellExecute ("print”;Document;"";"";SW_HIDE) > > Give that a try and see if it works for you. That does work for me. > > hth > julio >> On May 6, 2019, at 3:22 PM, Doug Cottrill via 4D_Tech <4d_tech@lists.4d.com> >> wrote: >> >> Julio (and all), >> >> So I tried the following code: >> >> $docName:=Select document("";".pdf";"Please select a document for print >> test:";0) >> If (OK=1) >> LAUNCH EXTERNAL PROCESS("print "+Document) >> LAUNCH EXTERNAL PROCESS("print "+Char(Quote)+Document+Char(Quote)) >> LAUNCH EXTERNAL PROCESS("print";Document) >> LAUNCH EXTERNAL PROCESS(Char(Quote)+"print "+Document+Char(Quote)) >> End if >> >> But none of those calls actually caused the selected PDF file to be printed. >> I tried them one at a time but put them all there at once for clarity. >> So, I’m clearly not getting the exact format correct. Can someone tell me >> what the exact syntax should be to get this to work? I have set PDF Reader >> to be the default application and verified that I can print the document I >> select >> if I open it manually. >> >> So, any ideas on what I’m doing wrong? More generally, is there a resource >> I can >> review to understand what I should be doing with LEP on windows in general. >> >> If I can’t figure it out, I will try using the Win32API that someone else >> suggested- >> the downside is that on windows you do actually have to open the document in >> a >> visible 4D window first, but I think we can live with that as long as we >> don’t need >> any user interaction to get it to print. (I’m actually printing multiple >> documents in >> one go, so having to do all the page setup stuff each time would get old >> fast) >> >> Thanks, >> >> DKC >> >> >>> On May 6, 2019, at 10:57 AM, Doug Cottrill via 4D_Tech >>> <4d_tech@lists.4d.com> wrote: >>> >>> Thanks Julio! I will give that a try- sounds like exactly what I was hoping >>> for. >>> On May 4, 2019, at 7:09 AM, Julio Carneiro via 4D_Tech <4d_tech@lists.4d.com> wrote: Try: “print xx.pdf”… simple as that :-) it tells Win 10 to just print the document using whatever app is set do print the type of document passed to the command. It’ll no open the app, will just print the document. hth julio >>> >> >> >> ** >> 4D Internet Users Group (4D iNUG) >> Archive: http://lists.4d.com/archives.html >> Options: https://lists.4d.com/mailman/options/4d_tech >> Unsub: mailto:4d_tech-unsubscr...@lists.4d.com >> ** > > -- > Julio Carneiro > jjfo...@gmail.com > > > > ** > 4D Internet Users Group (4D iNUG) > Archive: http://lists.4d.com/archives.html > Options: https://lists.4d.com/mailman/options/4d_tech > Unsub: mailto:4d_tech-unsubscr...@lists.4d.com > ** ** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
Re: Printing an existing PDF File in Windows 10
Sorry Doug, my fault. I should have indicated that you need to use Win32API “sys_ShellExecute”, instead of 4D’s LEP. In your case something like this should do the job: $x:=sys_ShellExecute ("print”;Document;"";"";SW_HIDE) Give that a try and see if it works for you. That does work for me. hth julio > On May 6, 2019, at 3:22 PM, Doug Cottrill via 4D_Tech <4d_tech@lists.4d.com> > wrote: > > Julio (and all), > > So I tried the following code: > > $docName:=Select document("";".pdf";"Please select a document for print > test:";0) > If (OK=1) > LAUNCH EXTERNAL PROCESS("print "+Document) > LAUNCH EXTERNAL PROCESS("print "+Char(Quote)+Document+Char(Quote)) > LAUNCH EXTERNAL PROCESS("print";Document) > LAUNCH EXTERNAL PROCESS(Char(Quote)+"print "+Document+Char(Quote)) > End if > > But none of those calls actually caused the selected PDF file to be printed. > I tried them one at a time but put them all there at once for clarity. > So, I’m clearly not getting the exact format correct. Can someone tell me > what the exact syntax should be to get this to work? I have set PDF Reader > to be the default application and verified that I can print the document I > select > if I open it manually. > > So, any ideas on what I’m doing wrong? More generally, is there a resource I > can > review to understand what I should be doing with LEP on windows in general. > > If I can’t figure it out, I will try using the Win32API that someone else > suggested- > the downside is that on windows you do actually have to open the document in > a > visible 4D window first, but I think we can live with that as long as we > don’t need > any user interaction to get it to print. (I’m actually printing multiple > documents in > one go, so having to do all the page setup stuff each time would get old fast) > > Thanks, > > DKC > > >> On May 6, 2019, at 10:57 AM, Doug Cottrill via 4D_Tech >> <4d_tech@lists.4d.com> wrote: >> >> Thanks Julio! I will give that a try- sounds like exactly what I was hoping >> for. >> >>> On May 4, 2019, at 7:09 AM, Julio Carneiro via 4D_Tech >>> <4d_tech@lists.4d.com> wrote: >>> >>> Try: “print xx.pdf”… simple as that :-) >>> >>> it tells Win 10 to just print the document using whatever app is set do >>> print the type of document passed to the command. It’ll no open the app, >>> will just print the document. >>> >>> hth >>> julio >>> >> > > > ** > 4D Internet Users Group (4D iNUG) > Archive: http://lists.4d.com/archives.html > Options: https://lists.4d.com/mailman/options/4d_tech > Unsub: mailto:4d_tech-unsubscr...@lists.4d.com > ** -- Julio Carneiro jjfo...@gmail.com ** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
Re: Printing an existing PDF File in Windows 10
Julio, Thank you! I’ll give that a shot. Looks like what I’m looking for, and I already downloaded Win32API. DKC > On May 6, 2019, at 2:39 PM, Julio Carneiro via 4D_Tech <4d_tech@lists.4d.com> > wrote: > > Sorry Doug, my fault. I should have indicated that you need to use Win32API > “sys_ShellExecute”, instead of 4D’s LEP. > > In your case something like this should do the job: > $x:=sys_ShellExecute ("print”;Document;"";"";SW_HIDE) > > Give that a try and see if it works for you. That does work for me. > > hth > julio >> On May 6, 2019, at 3:22 PM, Doug Cottrill via 4D_Tech <4d_tech@lists.4d.com> >> wrote: >> >> Julio (and all), >> >> So I tried the following code: >> >> $docName:=Select document("";".pdf";"Please select a document for print >> test:";0) >> If (OK=1) >> LAUNCH EXTERNAL PROCESS("print "+Document) >> LAUNCH EXTERNAL PROCESS("print "+Char(Quote)+Document+Char(Quote)) >> LAUNCH EXTERNAL PROCESS("print";Document) >> LAUNCH EXTERNAL PROCESS(Char(Quote)+"print "+Document+Char(Quote)) >> End if >> >> But none of those calls actually caused the selected PDF file to be printed. >> I tried them one at a time but put them all there at once for clarity. >> So, I’m clearly not getting the exact format correct. Can someone tell me >> what the exact syntax should be to get this to work? I have set PDF Reader >> to be the default application and verified that I can print the document I >> select >> if I open it manually. >> >> So, any ideas on what I’m doing wrong? More generally, is there a resource >> I can >> review to understand what I should be doing with LEP on windows in general. >> >> If I can’t figure it out, I will try using the Win32API that someone else >> suggested- >> the downside is that on windows you do actually have to open the document in >> a >> visible 4D window first, but I think we can live with that as long as we >> don’t need >> any user interaction to get it to print. (I’m actually printing multiple >> documents in >> one go, so having to do all the page setup stuff each time would get old >> fast) >> >> Thanks, >> >> DKC >> >> >>> On May 6, 2019, at 10:57 AM, Doug Cottrill via 4D_Tech >>> <4d_tech@lists.4d.com> wrote: >>> >>> Thanks Julio! I will give that a try- sounds like exactly what I was hoping >>> for. >>> On May 4, 2019, at 7:09 AM, Julio Carneiro via 4D_Tech <4d_tech@lists.4d.com> wrote: Try: “print xx.pdf”… simple as that :-) it tells Win 10 to just print the document using whatever app is set do print the type of document passed to the command. It’ll no open the app, will just print the document. hth julio >>> >> >> >> ** >> 4D Internet Users Group (4D iNUG) >> Archive: http://lists.4d.com/archives.html >> Options: https://lists.4d.com/mailman/options/4d_tech >> Unsub: mailto:4d_tech-unsubscr...@lists.4d.com >> ** > > -- > Julio Carneiro > jjfo...@gmail.com > > > > ** > 4D Internet Users Group (4D iNUG) > Archive: http://lists.4d.com/archives.html > Options: https://lists.4d.com/mailman/options/4d_tech > Unsub: mailto:4d_tech-unsubscr...@lists.4d.com > ** ** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
Re: Printing an existing PDF File in Windows 10
Doug, 2 suggestions: - 1 - go to www.computerhope.com -- very good, and seemingly complete, documentation for OSX, Linux, DOS, Windows. You can get the exact syntax for the command(s) you want. - 2 - get whatever you end up with working from the command line -- FIRST --, then screw around with getting LEP to work. I have found some commands just will Not run through LEP (xCopy is one). Chip On Mon, 6 May 2019 14:22:53 -0400, Doug Cottrill via 4D_Tech wrote: > Julio (and all), > > So I tried the following code: > > $docName:=Select document("";".pdf";"Please select a document for > print test:";0) > If (OK=1) > LAUNCH EXTERNAL PROCESS("print "+Document) > LAUNCH EXTERNAL PROCESS("print "+Char(Quote)+Document+Char(Quote)) > LAUNCH EXTERNAL PROCESS("print";Document) > LAUNCH EXTERNAL PROCESS(Char(Quote)+"print "+Document+Char(Quote)) > End if > > But none of those calls actually caused the selected PDF file to be printed. > I tried them one at a time but put them all there at once for clarity. > So, I’m clearly not getting the exact format correct. Can someone tell me > what the exact syntax should be to get this to work? I have set PDF Reader > to be the default application and verified that I can print the > document I select > if I open it manually. > > So, any ideas on what I’m doing wrong? More generally, is there a > resource I can > review to understand what I should be doing with LEP on windows in general. > > If I can’t figure it out, I will try using the Win32API that someone > else suggested- > the downside is that on windows you do actually have to open the > document in a > visible 4D window first, but I think we can live with that as long as > we don’t need > any user interaction to get it to print. (I’m actually printing > multiple documents in > one go, so having to do all the page setup stuff each time would get > old fast) > > Thanks, > > DKC > > >> On May 6, 2019, at 10:57 AM, Doug Cottrill via 4D_Tech >> <4d_tech@lists.4d.com> wrote: >> >> Thanks Julio! I will give that a try- sounds like exactly what I was >> hoping for. >> >>> On May 4, 2019, at 7:09 AM, Julio Carneiro via 4D_Tech >>> <4d_tech@lists.4d.com> wrote: >>> >>> Try: “print xx.pdf”… simple as that :-) >>> >>> it tells Win 10 to just print the document using whatever app is >>> set do print the type of document passed to the command. It’ll no >>> open the app, will just print the document. >>> >>> hth >>> julio >>> >> > > > ** > 4D Internet Users Group (4D iNUG) > Archive: http://lists.4d.com/archives.html > Options: https://lists.4d.com/mailman/options/4d_tech > Unsub: mailto:4d_tech-unsubscr...@lists.4d.com > ** --- Gas is for washing parts Alcohol is for drinkin' Nitromethane is for racing ** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
Re: Printing an existing PDF File in Windows 10
Julio (and all), So I tried the following code: $docName:=Select document("";".pdf";"Please select a document for print test:";0) If (OK=1) LAUNCH EXTERNAL PROCESS("print "+Document) LAUNCH EXTERNAL PROCESS("print "+Char(Quote)+Document+Char(Quote)) LAUNCH EXTERNAL PROCESS("print";Document) LAUNCH EXTERNAL PROCESS(Char(Quote)+"print "+Document+Char(Quote)) End if But none of those calls actually caused the selected PDF file to be printed. I tried them one at a time but put them all there at once for clarity. So, I’m clearly not getting the exact format correct. Can someone tell me what the exact syntax should be to get this to work? I have set PDF Reader to be the default application and verified that I can print the document I select if I open it manually. So, any ideas on what I’m doing wrong? More generally, is there a resource I can review to understand what I should be doing with LEP on windows in general. If I can’t figure it out, I will try using the Win32API that someone else suggested- the downside is that on windows you do actually have to open the document in a visible 4D window first, but I think we can live with that as long as we don’t need any user interaction to get it to print. (I’m actually printing multiple documents in one go, so having to do all the page setup stuff each time would get old fast) Thanks, DKC > On May 6, 2019, at 10:57 AM, Doug Cottrill via 4D_Tech <4d_tech@lists.4d.com> > wrote: > > Thanks Julio! I will give that a try- sounds like exactly what I was hoping > for. > >> On May 4, 2019, at 7:09 AM, Julio Carneiro via 4D_Tech >> <4d_tech@lists.4d.com> wrote: >> >> Try: “print xx.pdf”… simple as that :-) >> >> it tells Win 10 to just print the document using whatever app is set do >> print the type of document passed to the command. It’ll no open the app, >> will just print the document. >> >> hth >> julio >> > ** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
Re: Printing an existing PDF File in Windows 10
Thanks Julio! I will give that a try- sounds like exactly what I was hoping for. > On May 4, 2019, at 7:09 AM, Julio Carneiro via 4D_Tech <4d_tech@lists.4d.com> > wrote: > > Try: “print xx.pdf”… simple as that :-) > > it tells Win 10 to just print the document using whatever app is set do print > the type of document passed to the command. It’ll no open the app, will just > print the document. > > hth > julio > >> On May 2, 2019, at 5:15 PM, Doug Cottrill via 4D_Tech <4d_tech@lists.4d.com> >> wrote: >> >> Hi all, >> >> I would like to automatically print an external document (specifically a >> PDF) from within 4D on Windows 10. The process would be: >> 1) Find the PDF to print (I know the name and location of this doc >> programmatically) >> 2) Open the PDF in Acrobat Reader >> 3) Tell reader to print the PDF >> 4) Close the document >> >> This should all be done without user intervention, and I have no need to >> display the document within 4D- I just want 4D to print the document. >> >> It seems like Launch External Process would be the way to do this, but I'm >> unfamiliar with exactly what I should be passing as parameters to do this. >> >> Any help appreciated, >> >> Thanks! > > -- > Julio Carneiro > jjfo...@gmail.com > > > > ** > 4D Internet Users Group (4D iNUG) > Archive: http://lists.4d.com/archives.html > Options: https://lists.4d.com/mailman/options/4d_tech > Unsub: mailto:4d_tech-unsubscr...@lists.4d.com > ** ** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
Re: Printing an existing PDF File in Windows 10
Try: “print xx.pdf”… simple as that :-) it tells Win 10 to just print the document using whatever app is set do print the type of document passed to the command. It’ll no open the app, will just print the document. hth julio > On May 2, 2019, at 5:15 PM, Doug Cottrill via 4D_Tech <4d_tech@lists.4d.com> > wrote: > > Hi all, > > I would like to automatically print an external document (specifically a PDF) > from within 4D on Windows 10. The process would be: > 1) Find the PDF to print (I know the name and location of this doc > programmatically) > 2) Open the PDF in Acrobat Reader > 3) Tell reader to print the PDF > 4) Close the document > > This should all be done without user intervention, and I have no need to > display the document within 4D- I just want 4D to print the document. > > It seems like Launch External Process would be the way to do this, but I'm > unfamiliar with exactly what I should be passing as parameters to do this. > > Any help appreciated, > > Thanks! -- Julio Carneiro jjfo...@gmail.com ** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **