CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8
  1. #1
    Join Date
    Aug 2002
    Location
    INDIA
    Posts
    20

    Post Convert PCL to PDF

    I'm developing an application where I need a FREEWARE utility to convert Printer Control Language(PCL) file to PDF. I searched the net but haven't yet found any freeware utility for this purpose. By the way, Is it possible to send a file directly to Acrobat PDF Writer printer driver through code. If yes, then that solves my problem. Can somebody help on this issue.

    Thanks in advance
    Debarshi
    Last edited by Debsoft; January 10th, 2003 at 06:19 AM.

  2. #2
    Join Date
    Jun 2001
    Location
    MO, USA
    Posts
    2,868
    Yes, just change the printer to the Acrobat Driver and use the same code you use to print the report to any other printer. It will prompt you for a filename. I'm using sendkeys to automatically populate the filename, but it's a little messy (the box still pops up then goes away) and it doesn't always work if focus gets change to other applications during the process. I've search but not found any better way to assign the filename other than manually.

  3. #3
    Join Date
    Aug 2002
    Location
    INDIA
    Posts
    20
    Hi DSJ

    Thanks for ur reply. I was also thinking on the same lines as you but I have a problem

    I wanted to know how can one use the VB Printer object to send any file (Doc or PCL or for that reason any file) to a Printer Device Driver and make it to print.

    I tried to use Printer object to send the PCL file to Acrobat PDFWriter Printer driver, but Printer object doesn't contain any property which will take an input file and create PDF from it.
    I know Acrobat PDFWriter creates a PDF from any file but how am I going to send the PCL file directly to PDFWriter through code.
    I can set the Acrobat PDFWriter as the default printer, but how am I going to send the PCL file or any other file directly to this printer through code. Any help will be highly appreciated...

    Regards,
    Deb

  4. #4
    Join Date
    Dec 2001
    Location
    Seattle, WA
    Posts
    44
    You can reference the Adobe Acrobat Distiller object, which requires the full version of Acrobat. Then you can forward any PostScript (or most PCL files) to the object.

    take a look at the Acrobat SDK -
    Adobe Acrobat 5 SDK

    and some Adobe VB code samples for Distiller -
    Adobe VB code samples

    Point your attention to the DistillerCtrl

  5. #5
    Join Date
    Aug 2002
    Location
    INDIA
    Posts
    20

    Re:

    Hi sks04!

    Thanks for the reply. I went to the Adobe site and got the DistillerCtrl code downloaded. But it isn't working with the PCL files that I have. It takes Postscripts(.ps) files only. Also it failed t convert certain postscripts file that I have. May be the tool converts only certain postscripts file. Is there any difference between Adobe Acrobat 4 and 5 versions. I converted a PCL file to PDF using ghostscripts and it opens up in Acrobat Reader 4 but in Acrobat Reader 5 it gives a draw error. I think there is a difference in which the both versions interpret PCL File.
    If you have any suggesstion, you can surely pass it on to me.

    Thanks,
    Debsoft

  6. #6
    Join Date
    Jun 2001
    Location
    MO, USA
    Posts
    2,868
    How are the PCL files being created? If from your program, then just change the printer to the Acrobat driver.

  7. #7
    Join Date
    Dec 2001
    Location
    Seattle, WA
    Posts
    44
    Can you send me a couple of small sample PCL files? (zipped)

    The previous message-poster was right, use a different printer driver to create the PS or PCL file...preferably the Distiller driver, most HP drivers will work.

    Ghostscript can create PDF docs, but they won't always be 100% compatible with Adobe Acrobat Viewer (versions 4 or 5). An Adobe route is advised.

    Again, please send some PS and PCL sample files, within your next reply.

    thanks

  8. #8
    Join Date
    May 2013
    Posts
    83

    Re: Convert PCL to PDF

    Try this PCL to PDF converter , its a cloud API that uses many languages like java , .net etc to convert your PCL files to pdf you can selct the language you want.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured