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 > I need help - I can help
  New Posts New Posts RSS Feed - My printed pages are blank!
  FAQ FAQ  Forum Search   Register Register  Login Login

My printed pages are blank!

 Post Reply Post Reply
Author
Message
Jim Sullivan View Drop Down
Team Player
Team Player


Joined: 10 Nov 05
Location: United States
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jim Sullivan Quote  Post ReplyReply Direct Link To This Post Topic: My printed pages are blank!
    Posted: 17 Apr 06 at 4:27PM

OK, for the first time I'm trying to use the PrintDocument function.  Here's my code:

QP.SaveToFile "c:\temp\pages.pdf"

'Call ShellExecute(apiGetWindow(apiGetDesktopWindow(), GW_CHILD), "Print", "c:\temp\pages.pdf", vbNullString, CurrentProject.Path, SW_HIDE)
QP.PrintDocument("Microsoft Office Document Image Writer", 1, 2, QP.PrintOptions(0, 0, "Pages"))

The content exists in the file pages.pdf.  Also, when I then use the commented out line to print the pages.pdf file it works fine.  When I use the PrintDocument command, though, I get two blank pages.

Is there something else I need to do?

 

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

Joined: 29 Oct 05
Status: Offline
Points: 3151
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 18 Apr 06 at 1:56AM
Hi!
Perhaps it's the missing "LoadFromFile" before "PrintDocument"...?
Best regards,
Ingo
Back to Top
Jim Sullivan View Drop Down
Team Player
Team Player


Joined: 10 Nov 05
Location: United States
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jim Sullivan Quote  Post ReplyReply Direct Link To This Post Posted: 18 Apr 06 at 10:00AM

I am generating the file in memory completely before I execute my SaveToFile command.  Well, actually I'm opening up and existing form, filling out the fields, adding some extra text, and then saving.  But the saved file looks fine, so that means that I have the two-page form in the object, right?

 

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: 90
Post Options Post Options   Thanks (0) Thanks(0)   Quote swb1 Quote  Post ReplyReply Direct Link To This Post Posted: 18 Apr 06 at 10:15AM

That sounds correct.

Have you tried RenderDocumentToFile? This function employs a number of the same routines as PrintDocument.

You may also wish to try re-loading your document after the save.

 

Regards

sb

 

 

 

Back to Top
Jim Sullivan View Drop Down
Team Player
Team Player


Joined: 10 Nov 05
Location: United States
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jim Sullivan Quote  Post ReplyReply Direct Link To This Post Posted: 18 Apr 06 at 10:47AM

It turns out that way earlier in the process I had encrypted the document so that it could be opened but not changed.  When I commented out that line then the printing worked.

 

Back to Top
Jim Sullivan View Drop Down
Team Player
Team Player


Joined: 10 Nov 05
Location: United States
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jim Sullivan Quote  Post ReplyReply Direct Link To This Post Posted: 18 Apr 06 at 11:06AM

OK, new problem.  After not encrypting the file I do get a printout.  However, all data in my form fields is gone.

The same thing happens when I use FlattenFormField without even printing.  When I use FlattenFormField and then save the file to the hard drive, the information disappears.

 

Back to Top
JanN View Drop Down
Senior Member
Senior Member


Joined: 29 Oct 05
Location: Germany
Status: Offline
Points: 116
Post Options Post Options   Thanks (0) Thanks(0)   Quote JanN Quote  Post ReplyReply Direct Link To This Post Posted: 18 Apr 06 at 12:44PM
In such cases I like to recommend the functions SetNeedAppearances and UpdateAppearanceStream.

Hope this helps.
Back to Top
Jim Sullivan View Drop Down
Team Player
Team Player


Joined: 10 Nov 05
Location: United States
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jim Sullivan Quote  Post ReplyReply Direct Link To This Post Posted: 18 Apr 06 at 1:39PM

When would you suggest doing this?  I tried it all over and it didn't seem to help.  Here's my current code:

qp.LoadFromFile CurrentProject.Path & "\fields.pdf"
qp.SetNeedAppearances 1

Do Until qp.FormFieldCount = 0
    qp.UpdateAppearanceStream 1
    qp.FlattenFormField 1
Loop
qp.SaveToFile CurrentProject.Path & "\test.pdf"

The file test.pdf contains no information from any fields on it.

Back to Top
JanN View Drop Down
Senior Member
Senior Member


Joined: 29 Oct 05
Location: Germany
Status: Offline
Points: 116
Post Options Post Options   Thanks (0) Thanks(0)   Quote JanN Quote  Post ReplyReply Direct Link To This Post Posted: 19 Apr 06 at 3:03AM
To be honest: I do not really know. It's just that these functions were helpful in some cases that had to do with form fields.
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