Results 1 to 7 of 7

Thread: Adobe Acrobat 5.0 PDFWriter and Windows 10

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2008
    Posts
    23

    Question Adobe Acrobat 5.0 PDFWriter and Windows 10

    Hello VB6 Community,

    First please let me fully acknowledge that I am aware this isn't a VB6 specific problem, and might not "technically" fall under the VB6 forum category.

    However, these particular technologies are so commonly used together with VB6, and the communities that use these technologies are so small, I feel like it is best served for myself, and others potentially in the same situation, to remain under the VB6 forum.

    I am hoping to get some help with a work problem I recently "inherited"... The company I am working for has rendered my services to help them get their information system application migrated from Windows XP machines to Windows 10 machines. The core components of the program were developed in Visual Basic 6, Crystal Reports 8, and Adobe Acrobat 5. I already know 99% of peoples answers are along the lines of "You need to upgrade" or "Why are you using that?!". For those people, the answer is simply because my immediate need is to use what I was given, and the eventual plan is to migrate everything over to newer versions of these core components.

    I have made some code adjustments already and found some other updated drivers for other dependencies, and so far through initial testing, it seems the application is performing as expected.

    Unfortunately, yesterday, I hit a major snag where the application is trying to print to the "Adobe PDFWriter" printer, which doesn't seem to be installed on Windows 10, even though I installed Adobe Acrobat 5.0, as administrator, with the "Include PDFWriter files" option checked during install.

    • I can't find the printer in the list of printers.
    • I can't find any specific ports or drivers for Adobe when trying to manually add the printer.
    • The main PDFWriter dll, "pdfddui.dll", and supporting dlls, ("pdfdd.dll", "pdfkd.dll") do not exist under the "Windows\System32\spool\drivers" location, which is where they are found on a working Windows XP machines.
    • The main dlls and supporting dlls mentioned above DO exist under "Windows\System32\spool\drivers\x64"
    • When searching the registry for the main dll or supporting dlls, nothing is found, suggesting the dlls weren't able to successfully register.
    • When trying to manually register the dlls using "\Windows\SysWoW64\regsvr32.exe" it fails.
    • When trying to manually register the dlls using "\Windows\System32\regsvr32.exe" it fails.



    The code that is executing is doing the following:

    • It dynamically builds a crystal report from a SQL query based on parameters from a form.
    • It uses the crystal reports "SelectPrinter" function to specify the Printer.DriverName, Printer.DeviceName, Printer.Port
    • It uses the crystal reports "PrintOut" function to specify not to prompt the user for any input, i.e. "silent print".


    The end result, what I need to replicate, and what I need the communities help with is that Crystal Reports:

    • Prints the file as a PDF SILENTLY with NO user action required.
    • Prints the file with a specific filename.
    • Prints the file to a specific location.



    I have tried using Microsofts built-in Print to PDF, and that works, BUT it prompts the user to save the file, and I see no way to programmatically change that from VB6.

    I would imagine newer versions of Adobe Acrobat ARE NOT compatible with Visual Basic 6, additionally, the licenses for Adobe Acrobat are kind of pricey when the ONLY functionality I need is the ability to programmatically print to PDF.

    Any useful comments, suggestions, resolutions will be very much appreciated!

  2. #2
    PowerPoster jdc2000's Avatar
    Join Date
    Oct 2001
    Location
    Idaho Falls, Idaho USA
    Posts
    2,393

    Re: Adobe Acrobat 5.0 PDFWriter and Windows 10

    There are lots of .pdf printers available, many are free. You could try one of those. Most should be able to print without user intervention.

    Possibly useful link:

    https://superuser.com/questions/1038...r-intervention

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Oct 2008
    Posts
    23

    Re: Adobe Acrobat 5.0 PDFWriter and Windows 10

    Quote Originally Posted by jdc2000 View Post
    There are lots of .pdf printers available, many are free. You could try one of those. Most should be able to print without user intervention.

    Possibly useful link:

    https://superuser.com/questions/1038...r-intervention
    Thank you for the reply jdc2000...

    I have actually looked at that thread previously, and I have already explored PDF Creator as an option...

    With PDF Creator you can MANUALLY configure it to automatically save the file to a directory you specify, and with a filename you specify, and it doesnt prompt the user. You can even create profiles for different scenarios.

    However, the way the code was working with PDF Writer, is it printed it with a filename specified through VB6, and to the folder specified through VB6.

    Basically I need programattic control over configuring what the file is called, where the file is printed, and supressing any user prompts...

    I havent found any free virtual pdf printers that allow this with VB6.

    If I could use c# I could easily configure Microsofts Print to PDF, but im stuck using VB6 for now...

  4. #4
    PowerPoster jdc2000's Avatar
    Join Date
    Oct 2001
    Location
    Idaho Falls, Idaho USA
    Posts
    2,393

  5. #5
    PowerPoster wqweto's Avatar
    Join Date
    May 2011
    Location
    Sofia, Bulgaria
    Posts
    5,121

    Re: Adobe Acrobat 5.0 PDFWriter and Windows 10

    Microsoft Print to PDF and most other windows printers allow programatically printing to a file by setting DOCINFO.lpszOutput member to an actual filename just before calling StartDoc(hDC, DOCINFO) -- take a look at dilletante's UPrinter - Unicode Printer Class for actual implementation of print-to-file the way WinAPI is designed to do it.

    Unfortunately this StartDoc API call usually happens deep inside reporting engine layers, so unless there is OutputFile exposed as a property on some ReportPrinter class there is no chance to play along w/ windows conventions on print-to-file.

    PDF Creator 5.0 on the other hand is ancient piece of crode, completely incompatible w/ Windows 10 printing infrastructure, designed after unix/linux work folder queueing conventions.

    cheers,
    </wqw>

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Oct 2008
    Posts
    23

    Thumbs up Re: Adobe Acrobat 5.0 PDFWriter and Windows 10

    Thanks to all of you that answered! It helped point me in the right direction.

    I discovered that the last known version of Acrobat to work with VB6 was v8, although I did run across one user that claimed he got it working with Acrobat X.

    I tried out pdf955, but it only would allow me to specify the filename OR the foldername, it doesnt allow both which was a reall weird programming decision on their part.

    Someone on stack suggested checking out qvpdf, which looks like it might be a good choice for others in this situation, but I decided to go a different route.

    I revisted PDFCreator, and took a closer look at the source code, and it turns out it is using the registry to store its settings... So really all I have to do is update the registry settings on the fly, print my pdf, and I am good to go.

    I am using PDFCreator 1.6.1, and currently the source code can be found here, if anyone else needs it: https://sourceforge.net/projects/pdf...eator%201.6.1/

    Thanks again for everyones help!

  7. #7
    Frenzied Member
    Join Date
    Jun 2015
    Posts
    1,057

    Re: Adobe Acrobat 5.0 PDFWriter and Windows 10

    [...]
    Last edited by dz32; Apr 26th, 2019 at 11:20 AM.

Tags for this Thread

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