Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > General Discussion
  New Posts New Posts RSS Feed - Printing from QuickPDF
  FAQ FAQ  Forum Search   Register Register  Login Login

Printing from QuickPDF

 Post Reply Post Reply
Author
Message
jabaltie View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 Nov 05
Location: Brazil
Status: Offline
Points: 138
Post Options Post Options   Thanks (0) Thanks(0)   Quote jabaltie Quote  Post ReplyReply Direct Link To This Post Topic: Printing from QuickPDF
    Posted: 08 Nov 05 at 5:01AM
I'm trying to print a PDF from inside QuickPDF but the logotype it contains (image) wont show up at the paper.

When I print the same PDF from Acrobat, it works fine.

There must be something related to the PDF that I dont know...

The PDF I'm loading can be get from here :

http://www.DES.online.unimep.br/au/test.pdf

And, below is the code I'm using to print it :

OPTION EXPLICIT

DIM objMyForm,nReturn,nCount,nI,fName,fValue,poptions

Set objMyForm = WScript.CreateObject("ISED.QUICKPDF")

WScript.Echo objMyForm.unlockkey("...")

if objMyForm.LoadFromFile("TEST.PDF") = false then
    MsgBox objMyForm.LastErrorCode()
    Wscript.Quit(1)
end if

nReturn= objMyform.PrintOptions(0,0,"JobTitle")

WScript.Echo nReturn

poptions=objMyForm.PrintDocument("MYHPG85",1,1,nReturn)



What it could be ?

- The printer driver ?
- Something wrong with the PrintDocument method ?
- Chicks suggested me the GDI+ Library. What is it ? Is it free ?


Back to Top
chicks View Drop Down
Debenu Quick PDF Library Expert
Debenu Quick PDF Library Expert


Joined: 29 Oct 05
Location: United States
Status: Offline
Points: 251
Post Options Post Options   Thanks (0) Thanks(0)   Quote chicks Quote  Post ReplyReply Direct Link To This Post Posted: 08 Nov 05 at 11:40AM
Jose,

Again, it's just a guess, but if you're on Win2K or earlier, you may not have GDI+ installed. If you're on XP, it's part of the OS.

http://www.microsoft.com/downloads/details.aspx?FamilyID=6a63ab9c-df12-4d41-933c-be590feaa05a&DisplayLang=en

Also, try another printer, it printed for me on three different printers without problems.
Back to Top
jabaltie View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 Nov 05
Location: Brazil
Status: Offline
Points: 138
Post Options Post Options   Thanks (0) Thanks(0)   Quote jabaltie Quote  Post ReplyReply Direct Link To This Post Posted: 08 Nov 05 at 1:34PM
Chicks :

Thanks again 4 your help !

I updated the GDI Plus as you suggested on a W2K machine and it worked fine.

However, on my own machine, which is a W98, it is still not working.

I dont know how to update it...

Also, 98 % of my clients machines are W98. I have to figure out a strategy to update them all...

Back to Top
chicks View Drop Down
Debenu Quick PDF Library Expert
Debenu Quick PDF Library Expert


Joined: 29 Oct 05
Location: United States
Status: Offline
Points: 251
Post Options Post Options   Thanks (0) Thanks(0)   Quote chicks Quote  Post ReplyReply Direct Link To This Post Posted: 08 Nov 05 at 2:32PM
Do they all have Adobe Reader installed? I have a commandline app that can print PDFs silently using Reader versions 4 and up...

Also, according to this site:

http://www.geopainting.com/en/gdiplus.html

it's apparently the same .dll for all OS'. You "should" be able to simply download their .zip, extract gdiplus.dll, and copy it to \windows\system32...


Edited by chicks
Back to Top
jabaltie View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 Nov 05
Location: Brazil
Status: Offline
Points: 138
Post Options Post Options   Thanks (0) Thanks(0)   Quote jabaltie Quote  Post ReplyReply Direct Link To This Post Posted: 08 Nov 05 at 2:42PM
Hi Chicks !

I found how to solve the problem : just copied GDIPLUS.DLL on the same directory of the application and it worked fine !

As for Acrobat, I dont care if they have or not because QuickPDF doesnt demand it.

Thanks again 4 your help !
Back to Top
chicks View Drop Down
Debenu Quick PDF Library Expert
Debenu Quick PDF Library Expert


Joined: 29 Oct 05
Location: United States
Status: Offline
Points: 251
Post Options Post Options   Thanks (0) Thanks(0)   Quote chicks Quote  Post ReplyReply Direct Link To This Post Posted: 08 Nov 05 at 2:52PM
Cool!

Say hello to that "Girl From Ipanema" for me...
Back to Top
Michel_K17 View Drop Down
Newbie
Newbie
Avatar
www.exp-systems.com

Joined: 25 Jan 03
Status: Offline
Points: 297
Post Options Post Options   Thanks (0) Thanks(0)   Quote Michel_K17 Quote  Post ReplyReply Direct Link To This Post Posted: 08 Nov 05 at 10:54PM
Also, keep in mind that the QuickPDF library has a "loadlibrary" command so that you can tell it where GDI+ is located. Here are the specifics:

SetGDIPlusFileName
Description
Sets the path and filename of the GDI+ DLL (gdiplus.dll) used by the RenderDocumentToFile and DARenderPageToString functions. This can usually be left at the default, which means the DLL will most probably be stored in the windows/System folder, but on webservers, etc. it may be necessary to store the file in a different location.


Definition

function SetGDIPlusFileName(DLLFileName As String) As Long

Parameters

DLLFileName The path and file name of the GDI+ DLL, for example "c:dllsgdiplus.dll".

Returns

0 The specified file could not be found.
1 The GDI+ DLL file name was set successfully.
Back to Top
jabaltie View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 Nov 05
Location: Brazil
Status: Offline
Points: 138
Post Options Post Options   Thanks (0) Thanks(0)   Quote jabaltie Quote  Post ReplyReply Direct Link To This Post Posted: 10 Nov 05 at 5:14AM
Hi MIchel !

Thanks 4 your help. Nevertheless, the thing is : my original application, which is written in XBase++ (a Clipper 32 bits language) I could make it work fine using GDIPLUS.DLL on the same dir as the EXE.

However, when using VBScript, I still cant make it work. I tried to put GDIPLUS.DLL on the same directory as the script and it wont work. Also, tried to put it on the same place as CSCRIPT.EXE. Wont work either.

Then I tried your function call. Still wont work. This is my script :

OPTION EXPLICIT

Dim QP

Set QP = CreateObject("iSED.QuickPDF")

Call QP.UnlockKey("-mykey-")

if QP.SetGDIPlusFileName("C:\RPS\GDIPLUS.DLL") = 0 Then
   WScript.Echo "Could not load GDIPLUS..."
   WScript.Quit
End If

Call QP.PrintDocument("HPG85", 1, 1, QP.PrintOptions(2, 1, "TEST.PDF"))

set QP = nothing


Any clues ?
Back to Top
jabaltie View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 Nov 05
Location: Brazil
Status: Offline
Points: 138
Post Options Post Options   Thanks (0) Thanks(0)   Quote jabaltie Quote  Post ReplyReply Direct Link To This Post Posted: 10 Nov 05 at 5:22AM
OPS, sorry !

The script was wrong... Even fixing it however, the only way to make it work is to put the dll on c:\windows\command. The SetGDIPlusFileName function call seems to be useless at the script, although it's loading OK the dll :

OPTION EXPLICIT

Dim QP

Set QP = CreateObject("iSED.QuickPDF")

if QP.SetGDIPlusFileName("C:\RPS\GDIPLUS.DLL") = 0 Then
    WScript.Echo "Could not load GDIPLUS..."
    WScript.Quit
End If

Call QP.UnlockKey("mykey")

if QP.LoadFromFile("C:\TEST\WSH\TEST.PDF") = false then
    MsgBox objMyForm.LastErrorCode()
    Wscript.Quit
end if

Call QP.PrintDocument("HPG85", 1, 1, QP.PrintOptions(2, 1, "TEST JOB"))

set QP = nothing
Back to Top
chicks View Drop Down
Debenu Quick PDF Library Expert
Debenu Quick PDF Library Expert


Joined: 29 Oct 05
Location: United States
Status: Offline
Points: 251
Post Options Post Options   Thanks (0) Thanks(0)   Quote chicks Quote  Post ReplyReply Direct Link To This Post Posted: 10 Nov 05 at 3:34PM
Jose,

It "should" work if it's anywhere in your %PATH%. At the command prompt, type PATH to get your configured path. I don't remember Win98 (been a while), but it should have something like "C:\windows\system32" or "C:\windows\system" in the path. This is where M$ would normally install it.

QuickPDF should automagically use it if it's in your path somewhere.

Back to Top
jabaltie View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 Nov 05
Location: Brazil
Status: Offline
Points: 138
Post Options Post Options   Thanks (0) Thanks(0)   Quote jabaltie Quote  Post ReplyReply Direct Link To This Post Posted: 16 Nov 05 at 6:39AM
OK. I've moved it up to there , that is, C:\WINDDOWS\SYSTEM and now it's working.

Thanks again for your support.

Thread closed.
Back to Top
student View Drop Down
Beginner
Beginner
Avatar

Joined: 18 Nov 05
Location: Canada
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote student Quote  Post ReplyReply Direct Link To This Post Posted: 22 Nov 05 at 8:12PM
Did anyone run into this weird situation, when printing files automatically from ISED.DLL that there were JPEG files generated in the process.

Plus any suggestions about the large spool sizes on certain PDF files.

Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 23 Nov 05 at 2:27AM
Hi!
The automatically generated jpg-work-files are a small bug. In the old forum Jan told that's a "forgotten debug-function"...
Oliver gives there the advice...
try this:
- create a temporary, empty directory
- set the current dir for your app to that directory
- run your pdf-functions...
- erase the temporary directory

Best regards,
Ingo
Cheers,
Ingo

Back to Top
swb1 View Drop Down
Debenu Quick PDF Library Expert
Debenu Quick PDF Library Expert
Avatar

Joined: 05 Dec 05
Location: United States
Status: Offline
Points: 100
Post Options Post Options   Thanks (0) Thanks(0)   Quote swb1 Quote  Post ReplyReply Direct Link To This Post Posted: 08 Dec 05 at 9:35AM

The offending code can be found around line 1046 of v5.11 uPDFImageDecoder.pas. If you are a site licensee (with source code) and using Delphi you can fix this problem by commenting-out lines 1046 through 1050 and re-compiling the library.

 

swb

Back to Top
Michel_K17 View Drop Down
Newbie
Newbie
Avatar
www.exp-systems.com

Joined: 25 Jan 03
Status: Offline
Points: 297
Post Options Post Options   Thanks (0) Thanks(0)   Quote Michel_K17 Quote  Post ReplyReply Direct Link To This Post Posted: 08 Dec 05 at 10:53PM
Thanks for the tip! I'll go fix my copy. Update: I commented out the lines you suggested, and it did the trick. Thanks!

By the way, even though iSed calls it v5.11, the actual version number of the compiled library says that it is v4.42, which makes more sense to me as there are very little differences between v4.41 and v4.42. But they did fix the "EncryptFile" routine. When was that again? A year ago?

   Wow... time flies.

Edited by Michel_K17
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store