|
Post by ek on Oct 19, 2022 13:02:47 GMT 1
Hello there,
as stated above i am using the GhostPCL "Addon" to print PCL into a PDF. This works fine already, but i would like the pdf to be printed into another printer automatically so a letter head is added to it. Probably i need to add something here in my vdos config file:
lpt3 = PRIVATE RAW
Probebaly something like this? ("Windows command/program" [WAIT][HIDE] [program options] #LPTx/COMx.asc/txt)
Can somebody help me out with this?
Kind Regards
|
|
|
Post by Jos on Oct 19, 2022 18:03:24 GMT 1
If you want to control PCL6 or GSWIN2C, you first have to move that program out of the vDos directory or rename it. Else vDos will start it at detecting PCL output. The default behavior for PCL6 conforms to:
lpt3 = "C:\vDos\PCL6.EXE" WAITHIDE -sDEVICE=pdfwrite -o #LPT3.pdf #LPT3.asc
After that #LPT3.pdf is opened in the default PDF reader.
So you would have to replace "C:\vDos\PCL6.EXE" by some batch file that first creates a PDF document in the same way out of #lpt3.asc and then print it.
More simple would be to use the vDos internal DOS-to-Windows instead. But you’ll have reasons to use PCL6 or GSWIN32C.
Jos
|
|
|
Post by ek on Nov 30, 2022 13:08:23 GMT 1
Hi Jos,
thanks for your anwser. My Problem is, that the Dos To Windows Printing is not displaying the table correctly (For example lines are missing). It prints corretly through this way.
Could i use a batch-script that calls PCL6.EXE without opening the outcome and then print it into a printer?
Kind Regards
|
|
|
Post by Jos on Nov 30, 2022 14:09:04 GMT 1
If the printer supports PCL (most laser printers do), simplest would be something like: lpt3 = PRIVATE SEL: "Windows_PCL_printer" RAW
Else you could first rename PCL6.EXE to for instance PCL6a.EXE. And create a batch file (PRPCLPDF.BAT) that creates the PDF document by: PCL6a.EXE -sDEVICE=pdfwrite -o #LPT3.pdf #LPT3.asc
Then print #LPT3.pdf by: PDF2Printer (https://www.win10pdf.com/pdf-to-printer.html), or PDFtoPrinter (http://www.columbia.edu/~em36/pdftoprinter.html) There will be more options around.
Config.txt would then have: lpt3 = "c:\vDos\ PRPCLPDF.BAT" HIDE
Jos
|
|
|
Post by ek on Dec 1, 2022 9:00:53 GMT 1
Hi Jos, thanks for your reply again. As of now i followed these steps: sourceforge.net/p/vdos/discussion/printing/thread/86dc4dfa/My batch-script looks like this now: @echo off pcl6.exe -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=PCLPRINT.PDF "%1" SumatraPDF-3.4.6-64.exe -print-settings "paper=A4,fit,bin=300" -print-to "\\Server\Printer" PCLPRINT.PDF del PCLPRINT.PDF This is working already, but something with this pdf is diffrent from the original pdf that is printed by pcl6.exe. I'm running into problems when adding the letterhead now. Even if i just print the pdf and want to add the letterhead manually it doesnt work now. Do i understand correctly, that the pcl6.exe is still creating the pdf? What is the diffrence now from the automated process? Kind Regards and many thanks for your help
|
|
|
Post by ek on Dec 1, 2022 9:04:18 GMT 1
forgot to add, this is what im using for the printing port in my config: lpt1 = "C:\Program Files\vDos\pclprint.cmd" #LPT1.ASC
Ah by the way, the printer doesnt not support pcl streams. Thats why we need this.
|
|
|
Post by ek on Dec 1, 2022 9:54:34 GMT 1
FYI:
I found the problem. Printing through Sumatra PDF was the causing this problem. I switched to foxit reader and now it works! Thanks a lot
|
|
|
Post by Jos on Dec 1, 2022 10:06:54 GMT 1
If vDos detects the output is PCL and PCL6.exe is present in the vDos directory, it will execute (for LPT1): pcl6.exe -sDEVICE=pdfwrite -o #LPT1.PDF #LPT1.ASC
-dNOPAUSE -dBATCH are not that interesting since there’s no manual interaction with PCL6. -o is just an abbreviation of -sOutputFile=.
Adding -sPAPERSIZE=a4 would give a more appropriate direct result because U.S. letter is the default page size used by PCL6. Without SumatraPDF scaling it again. I don’t see a command (PDFTK?) to add the letterhead. If that is also A4, could be the mismatch with U.S. letter causes the problem. Also solved by -sPAPERSIZE=a4?
Jos
|
|
|
Post by ek on Dec 1, 2022 11:01:42 GMT 1
The Letterhead is added by a diffrent printer that i print on over foxit reader. I dont think the papersize was the problem, i think sumatra printed the content higher than the letterhead that would be added, thus it cannot be seen.
|
|
|
Post by ek on Dec 1, 2022 11:02:20 GMT 1
If possible this thread can be marked as "solved"
|
|
|
Post by Jos on Dec 1, 2022 12:17:12 GMT 1
If the paper size is A4, creating a A4 sized PDF is recommended to avoid incorrect positioning and later scaling.
No option to mark a thread as solved. Not a miss: Many (if not most) threads don't come with a confirmaton the problem/question was solved.
Jos
|
|