|
Subject:
|
PCL to PDF conversion
|
|
Posted By:
|
Kevinanderson
|
Post Date:
|
5/26/2008 10:31:56 PM
|
Hi,
I am developing a program in which i need to convert PCL (Printer Control Language) file to PDF format, I tried to search on the web but was not satisfied with the solutions. Is there a way through which i can do the conversion?
Or
Is there any piece of source code, dll, api, activeX etc. through which i can solve this problem?
I am using VB6.0.
Thanking You.
|
|
Reply By:
|
BrianWren
|
Reply Date:
|
5/27/2008 12:55:48 PM
|
I don't think this can be done. PCL is output from a print operation. So is PDF.
So you would need to go back from PCL to the original that led to it, and then go from there to PDF.
Don't you have the source that was turned into this PCL? Is this some old program that you cannot get to behave properly?
|
|
Reply By:
|
Kevinanderson
|
Reply Date:
|
5/28/2008 3:23:30 AM
|
Hi, Thanks for your reply, I tried to convert the PCL file to PDF with some of the applications available on the internet, but the problem with the applications is the FONT, the fonts are not according to my requirements.. Is there any way to map fonts? OR Is there any way in which i can convert the PCL file to some intermediate file which can later be converted to PDF file?
|
|
Reply By:
|
BrianWren
|
Reply Date:
|
5/28/2008 10:15:11 AM
|
Where is this PCL coming from?
|
|
Reply By:
|
Kevinanderson
|
Reply Date:
|
5/28/2008 11:13:45 PM
|
Hi,
I am creating PCL file through programming.
Thanking You.
|
|
Reply By:
|
BrianWren
|
Reply Date:
|
5/29/2008 12:04:00 PM
|
What do you mean? (It is easier to be helpful if yo are a little more forthcoming...)
You have control over this code that is creating the PCL file, and it is VB?
If that is right, then it seems the easiest thing to do is to stop creating PCL.
It is pretty easy to create output in ways that use Windows in a more integrated way. Under that way of doing things, you can create a .pdf pretty easily, by printing to a PDF “printer” driver.
My first choice would be to create an instance of Word, create a document in Word, then use Word’s means of printing, but specify a .pdf cretaor. An couple of added advantages are that you can save the document as a .doc, and that you can print to a real printer to check your output formatting during development.
But you might also be able to create a Rich-Text format textbox (either visible or not), create your output into that box (including font specifications), and use the print method(s) of the box to print to a PDF creator.
|
|
Reply By:
|
Kevinanderson
|
Reply Date:
|
6/2/2008 12:16:17 AM
|
Is it possible to create a ps file as output through programming in VB6?
|
|
Reply By:
|
BrianWren
|
Reply Date:
|
6/2/2008 11:56:17 AM
|
Ps?
|
|
Reply By:
|
Kevinanderson
|
Reply Date:
|
6/3/2008 11:37:55 PM
|
PS is a Postscript file.
|
|
Reply By:
|
BrianWren
|
Reply Date:
|
6/4/2008 10:38:29 AM
|
I believe that you can create anything with VB. With some output, you have to exert more "supervision..."
I believe that creating PS output would be just like creating a .PDF. The machine would have a driver on it for that format, and you would print to the driver.
As I understand it with PCL, you actually need to create the content of the file, sending the strings to print and the embedded codes through literal file input commands. That’s a lot of supervision!
Is there a reason you don’t want to just print to a .PDF driver? It seems like the easiest route, given what you have described so far...
|
|
Reply By:
|
Kevinanderson
|
Reply Date:
|
6/12/2008 11:18:11 PM
|
Thanks for your reply..
Actually we are using Form Forge software for designing purpose. This software is a freeware and uses PCL commands. We are combining our data with the software and generates PCL file. Now we need to convert this combined file into PDF.
Can we pass this PCL file directly to the PDF printer driver?
|
|
Reply By:
|
BrianWren
|
Reply Date:
|
6/13/2008 11:43:01 AM
|
No. Printer drivers take the output format that a windows program generates, and translates it to get the recipient of the driver (the printer, plotter, fax-to-modem) to produce the “described” result. For instance, Windows says put a dot at 100 × 37 to the driver, and the driver maybe says Line at 5 units by 1.2 units of length 0, because that is how that particular printer needs to hear the instruction so as to create the desired output.
In the case of a .PDF driver, the command from Windows winds up in a file. Drivers are essentially translators between Windows and hardware (even if it is virtual hrdware, like a .PDF file).
Drivers operate at a pretty low level of the operating system.
A converter, such as you are talking about, is at the software level, like any other .DLL or .EXE.
|
|
Reply By:
|
BrianWren
|
Reply Date:
|
6/13/2008 11:47:21 AM
|
Here's a thought...
It seems to me, you can drag a document, and drop it onto a printer icon in the Printers window. Or maybe onto an icon for that printer that you have created on the desktop.
I think that when you do this, Windows invokes the application that the document is associated with, so this might not work.
If there is a .PDF driver in the Printers window, perhaps you can drag the .PCL onto that driver... Questionalbel, but worth a try.
Try dragging the .PCL onto the intended printer to see if that works first.
I must say I'm dubious though.
|