| <<<Back 1 day (to 2017/11/13) | 20171114 |
Guest88115 | Respected Sir, I need to convert PCL file to PDF. I tried gpcl6win64.exe but the Output was is not at all proper and there are small small Black black box on all over the Fonts. I tried a lot to search on net and other places but could not find any solution. Please Provide a solution to convert PCL to PDF properly. Here is my PCL file https://www.dropbox.com/s/nbpky0wxlt789az/Test.pcl?dl=0 | 17:51.24 |
pipitas | Guest88115: I cannot answer your question, I'm myself just a visitor. The Ghostscript developers are often very busy and do not permanently monitor this #channel. But they look into logs and will answer later. Just be patient⦠| 18:05.24 |
| Guest88115: maybe you look at the output of the "gpcl6win64.exe -version" command and also provide info which version you are using. | 18:06.32 |
kens | CPL is not entirely compatible in its graphics imaging model with PDF, In particular any PCL which uses RasterOps is guranteed to be incorrect. | 18:10.36 |
| You can create a PDF file from such a PCL file by first rendering to an image and then using the tools view*.ps in toolbin to read the image data into Ghostscript and then create a PDF fiel from that | 18:11.13 |
| Oops the view*.ps programs are in lib not toolbin | 18:11.50 |
| Possibly rendering to pbm and then using viewpbm to read the result and send it to the pdfwrite device | 18:12.24 |
Guest88115 | I am using version 9.22 and here is the output file screen shot https://www.dropbox.com/s/r7527w48cmst15f/Testoutput.png?dl=0 | 18:13.49 |
kens | Looks like RasterOps to me | 18:14.24 |
| The only way to convert that to PDF is to render to an image and then wrap the image up as a PDF | 18:14.40 |
Guest88115 | Ok, Please tell me what is to be done I am not very expert in computers | 18:15.07 |
| Means Which command I shall run to convert it first into Image | 18:15.34 |
kens | You need to use Ghostscript to render the PCL to a series of images, one per page. pbmraw is most likely the best option | 18:15.39 |
| Then you need to use viewpbm.ps along with Ghostscritp and the pdfwrite device to read each PBM file and create a PDF from the files. | 18:16.18 |
| I do not have the time currntly to write this out in step by step instructions. | 18:17.32 |
Guest88115 | Ok, Kindly provide some short steps if you can, Otherwise will Try, Thanks | 18:19.15 |
kens | See above for an outline of how to proceed. You may need to use some other bitmap format | 18:19.40 |
Guest88115 | Ok. Will Give a try, However if you get time please tell me in detail later at harshfatnani@rediffmail.com. I will be helpful | 18:21.02 |
pipitas | Guest88115: Maybe start with 1st page first, to see if it indeed works: "gpcl6win64.exe -dFirstPage=1 -dLastPage=1 -o 1.pbm -sDEVICE=pbmraw Test.pcl" | 18:24.01 |
| Guest88115: After that, you could also use ImageMagick v.7 (http://imagemagick.org/script/download.php) to convert the image file: "magick convert 1.pbm 1.pdf" â may be easier. | 18:25.57 |
Guest88115 | A file 1.PBM is created in my folder | 18:27.24 |
| Now How can I convert it that to PDF | 18:27.38 |
pipitas | Otherwise, with Ghostscript: "gswin64c.exe -o 1.pdf -sDEVICE=pdfwrite -c viewpbm.ps -f 1.pbm" or "gswin64c.exe -o 1.pdf -sDEVICE=pdfwrite -c 'c:/full/path/to/viewpbm.ps' -f 1.pbm" | 18:27.44 |
Guest88115 | Using Ghostscript | 18:27.44 |
| No PDF is created , Seems that viewpbm.ps is located at D:\Ghost\GhostPDL\ghostpdl-9.22\lib | 18:31.50 |
| I tried these two commands but no PDF created | 18:33.11 |
| gswin64c.exe -o 1.pdf -sDEVICE=pdfwrite -c 'c:/full/path/to/viewpbm.ps' -f 1.pbm | 18:33.20 |
| gswin64c.exe -o 1.pdf -sDEVICE=pdfwrite -c 'D:\Ghost\GhostPDL\ghostpdl-9.22\lib' -f 1.pbm | 18:33.22 |
| It is giving error as gswin64c.exe is not recognised as internal or external command | 18:35.38 |
pipitas | Guest88115: Well, I'm not running Windows at the moment. I was guessing the name of the .exe file. You have to look up and correct my (obviously wrong) guess of the name⦠| 18:40.48 |
| The params for the commandline in your case should then be: "-o 1.pdf -sDEVICE=pdfwrite -c 'D:\Ghost\GhostPDL\ghostpdl-9.22\lib\viewpbm.ps' -f 1.pbm" | 18:41.57 |
Guest88115 | Yes I have changed it to 'D:\Ghost\GhostPDL\ghostpdl-9.22\lib\viewpbm.ps' but giving error as gswin64c is not revognised as internal or external command | 18:42.57 |
pipitas | maybe you need the Ghostscript executable as well? S.th. like "D:\Ghost\GhostPDL\ghostpdl-9.22\bin\gswin64c.exe" or similar? | 18:43.14 |
Guest88115 | Its already there in the same directory , I have copied all files in same directory | 18:45.16 |
pipitas | As I said, maybe the .exe has another name? If gswin64c.exe is not there, maybe gswin64.exe, gswin32c.exe or gswin32.exe are? | 18:45.21 |
Guest88115 | ok | 18:45.38 |
| I am checking | 18:45.44 |
pipitas | And as I said previously, maybe using ImageMagick to go from PBM to PDF is easier. | 18:46.20 |
Guest88115 | gswin64 created PDF but all Blank | 18:47.27 |
pipitas | For me it worked (I meanwhile downloaded your Test.pcl). But I'm using Ghostscript v9.21 on a macOS system⦠| 18:50.38 |
Guest88115 | Sir Please Check my Test. PCL and tell | 18:52.30 |
| I am able to create 1.PBM as per the command you told earlier , PDF file is also created but just 3 KB all totally Blank using this command gswin64.exe -o 1.pdf -sDEVICE=pdfwrite -c viewpbm.ps -f 1.pbm | 18:54.02 |
pipitas | Sorry, no more time, have to leave, Guest88115. Check the ImageMagick link above to convert PBM to PDF. | 18:57.53 |
Guest88115 | Ok Sir Thanks a Lot | 18:58.45 |
| I have tried ImageMagick also but the quality of the output PDF is very poor | 19:07.01 |
| While converting 1.PBM to PDF using gswin64.exe error is generated as Error/Undefined in viewpbm.ps Execution stack ..... | 19:11.05 |
pipitas | Guest88115: To increase quality (and file size!), add "-r 200" or even "-r 300" to the PBM-generating command: "gpcl6win64.exe  -dFirstPage=1 -dLastPage=1 -o 1.pbm -sDEVICE=pbmraw -r 300 Test.pcl" | 19:19.04 |
Guest88115 | Ok Sir, But How I will merge the PBM pages to get the PDF File with all Pages as it is giving only one Page | 19:20.39 |
| This Didn't worked any output gpcl6win64.exe -dFirstPage=1 -dLastPage=1 -o 11.pbm -sDEVICE=pbmraw -r 300 Test.pcl | 19:24.35 |
pipitas | 1.) "gpcl6win64.exe -o page-%02d.pbm -sDEVICE=pbmraw -r300 Test.pcl" will generate 4 PBMs: page-01.pbm, page-02.pbm, â¦. Then: | 19:27.10 |
| 2.) "magick convert page-*.pmb allpages.pdf" | 19:27.11 |
Guest88115 | it is saying perhaps -r must be followed by <res> or <xres> | 19:27.50 |
pipitas | Guest88115: Sorry, the "-r" parameter cannot tolerate a blank. Give "-r200" or "-r300" | 19:28.01 |
Guest88115 | ok | 19:28.09 |
| checking | 19:28.14 |
pipitas | My fault, sorry. | 19:28.30 |
Guest88115 | Yes sir it created a Big size PBM , one more help pls sir what i have to exactly do in Imagemagix I have downloaded the entire installer | 19:29.41 |
| This also Didn't created any Pages gpcl6win64.exe -o page-%02d.pbm -sDEVICE=pbmraw -r300 Test.pcl | 19:32.17 |
pipitas | It's called "ImageMagick". You'll want the newest version, probably "ImageMagick-7.0.7-11-Q16-x64-static.exe". Installing it â you're on your own. When installed, let's hope it sets up your %PATH% environment variable correctly. Then just open a "cmd.exe" window, navigate to your PBM files and execute the command "magick convert page-%.pbm allpages.pdf" and you're done. | 19:34.15 |
| Guest88115: What now? First you say: "it created a Big size PBM" (as it should) â now it is "Didn't created any Pages" ?? | 19:35.30 |
Guest88115 | Ok. Sir a Last one Perhaps.. This command is not creating all Pages gpcl6win64.exe -o page-%02d.pbm -sDEVICE=pbmraw -r300 Test.pcl | 19:35.36 |
pipitas | How many pages do you expect? Remember for each page you'll get one PBM file. | 19:36.08 |
Guest88115 | Ok Perhaps my file itslef was of one Page | 19:36.40 |
pipitas | Your Test.pcl file has 4 pages⦠| 19:36.56 |
Guest88115 | Than Why i dind,t got four pages, Using that command i dinnt got any | 19:37.22 |
pipitas | Did you get an error or warning message from this command? | 19:38.01 |
| For me (on a macOS) this all works and at the end I get a 4 page PDF with size 1.1 MByte and rather crispy text | 19:38.47 |
Guest88115 | Error code 9 | 19:39.33 |
| could not open file d:\...\new2dbat.pbm | 19:40.49 |
| Ok if I change a command to gpcl6win64.exe -dFirstPage=1 -dLastPage=4 -o 11.pbm -sDEVICE=pbmraw -r200 Test.pcl I am able to get all 4 Pages in one PBM file | 19:47.01 |
| Thank you very Much pipitas Sir, Thanks a lot I was wondering all over the internet since last one week to get the solution. Thanks Ghostcript also for the support | 19:54.13 |
| pipitas Sir, still having problem in converting to PDF from PBM. This command is not working C:\Program Files\ImageMagick-7.0.7-Q16\magick convert page-11.pmb allpages.pdf | 20:22.09 |
pipitas | Is "C:\Program Files\ImageMagick-7.0.7-Q16\magick" an .exe ? | 20:41.34 |
Guest88115 | Yes | 20:41.48 |
| Yes it is Exe file | 20:42.36 |
pipitas | Also, I doubt that page-11.pmb is a 4 page file. (1) Suffix should be ".pbm", not ".pmb". (2) output file name should be "page-%02d.pbm". | 20:43.06 |
| Waitâ¦. maybe in a Windows CMD terminal window you need to double up the %%? Maybe "page-%%02d.pbm"? | 20:43.58 |
Guest88115 | Not got it | 20:46.08 |
| trying with one page | 20:46.45 |
| No didnt worked | 20:48.44 |
| I have tried all These | 20:50.15 |
| C:\Program Files\ImageMagick-7.0.7-Q16\magick convert 11.pbm allpages.pdf C:\Program Files\ImageMagick-7.0.7-Q16\magick convert page-11.pbm allpages.pdf C:\Program Files\ImageMagick-7.0.7-Q16\magick convert page-page-%%02d.pbm allpages.pdf C:\Program Files\ImageMagick-7.0.7-Q16\magick convert 1page.pbm allpages.pdf | 20:50.18 |
| C:\Program Files\ImageMagick-7.0.7-Q16\magick convert 11.pbm allpages.pdf | 20:50.32 |
| C:\Program Files\ImageMagick-7.0.7-Q16\magick convert page-11.pbm allpages.pdf | 20:50.42 |
| C:\Program Files\ImageMagick-7.0.7-Q16\magick convert page-page-%%02d.pbm allpages.pdf | 20:50.51 |
| C:\Program Files\ImageMagick-7.0.7-Q16\magick convert 1page.pbm allpages.pdf | 20:50.59 |
| Nothing worked | 20:51.04 |
| Using This gpcl6win64.exe -o page-%%02d.pbm -sDEVICE=pbmraw -r300 Test.pcl I am able to create Page-01, Page-02, Page-03 and Page-04. But I am not able to create PDF using C:\Program Files\ImageMagick-7.0.7-Q16\magick convert page-*.pmb allpages.pdf | 21:22.54 |
| Forward 1 day (to 2017/11/15)>>> | |