[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Printing PDF Dokuments with Windows API (bad chars instead of the Document-Font)

Posted on 2003-11-13
5
Medium Priority
?
1,607 Views
Last Modified: 2013-12-03
Hello,

i have to print many Files with different File-Extensions.

I have solved the problem, by printing with the Windows-API.

Every Document will be printed by its own application now.

It´s like you would click with the right mousebutton on a filename
at Windows-Explorer and choose PRINT from the Contextmenu.

I have written a function, which do this with many many files.
(Open Filetype, print File with API, open next file and so on)

The printer prints out the Files correctly, but after 100 or
more Pages, the FONT of the PDF Document gets corrupt,
that means, instead of LETTERS there are only rectangular
Boxes on the printed Paper. Some pages later, the font
is ok again, some pages later the font crashes again.
Graphics are allways printed correctly...

I think this mistake only happens, if the PDF Document has
graphic inside and is longer than 10 Pages per Document.

The Printer is a HP Laserjet 4000, the Operating System
is Windows 2000 (tested with XP, with the same result)
I use the Printer-Spooler (no direct printing). The Language
i have used is VB 6.0 SP4. I have tested it with Acrobat Reader
4.0 and 5.0 (same results).

Some strangeness:

1.
If i print out Office Documents, the Officeprogram opens, prints
and closes then. If i print PDF´s the Acrobat Reader opens, prints
but don´t close, it stores the printed Document in Memory and
opens the next, and so on... I am able to see all printed documents
if i switch the pages forward or backward after all jobs are done.

2.
No error message appears (to less memory, or font not found or
something like that)

What kind of problem do i have :

Printer Memory to low ?
Virtual Memory to low ?
Spooler corrupt ?
Acrobat don´t close itself and stores Docs in Memory for browsing ?

Can you gimme a tip, how i can avoid this behaviour ?
0
Comment
Question by:Astar0th
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 

Accepted Solution

by:
ishmell earned 500 total points
ID: 9744086
I'd try installing the PS (post script) version of the printer driver. I've had similar problems printing several things to my HP 4100 printer from my win2k box until I changed up to the postscript driver.
0
 

Expert Comment

by:ishmell
ID: 9744101
PS, also, if you want to get adobe to close after printing, you might try the to shell out acrobat reader with the "secret" command line option:

http://www.planetpdf.com/mainpage.asp?WebPageID=90
0
 

Author Comment

by:Astar0th
ID: 9747354
Thank you very much, this has solved my problem !!!!
0
 

Expert Comment

by:ishmell
ID: 9749670
Glad to help!
0
 
LVL 14

Expert Comment

by:sandeep_patel
ID: 23594219
Astar0th,
I am trying to create the same functionality. wanted to know what are the api's you used for this?
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question