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!
![]() |
My printed pages are blank! |
Post Reply ![]() |
Author | |
Jim Sullivan ![]() Team Player ![]() Joined: 10 Nov 05 Location: United States Status: Offline Points: 36 |
![]() ![]() ![]() ![]() ![]() 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) 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?
|
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3530 |
![]() ![]() ![]() ![]() ![]() |
Hi!
Perhaps it's the missing "LoadFromFile" before "PrintDocument"...? Best regards, Ingo |
|
![]() |
|
Jim Sullivan ![]() Team Player ![]() Joined: 10 Nov 05 Location: United States Status: Offline Points: 36 |
![]() ![]() ![]() ![]() ![]() |
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?
|
|
![]() |
|
swb1 ![]() Debenu Quick PDF Library Expert ![]() Joined: 05 Dec 05 Location: United States Status: Offline Points: 103 |
![]() ![]() ![]() ![]() ![]() |
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
|
|
![]() |
|
Jim Sullivan ![]() Team Player ![]() Joined: 10 Nov 05 Location: United States Status: Offline Points: 36 |
![]() ![]() ![]() ![]() ![]() |
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.
|
|
![]() |
|
Jim Sullivan ![]() Team Player ![]() Joined: 10 Nov 05 Location: United States Status: Offline Points: 36 |
![]() ![]() ![]() ![]() ![]() |
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.
|
|
![]() |
|
JanN ![]() Senior Member ![]() Joined: 29 Oct 05 Location: Germany Status: Offline Points: 116 |
![]() ![]() ![]() ![]() ![]() |
In such cases I like to recommend the functions SetNeedAppearances and UpdateAppearanceStream.
Hope this helps. |
|
![]() |
|
Jim Sullivan ![]() Team Player ![]() Joined: 10 Nov 05 Location: United States Status: Offline Points: 36 |
![]() ![]() ![]() ![]() ![]() |
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" Do Until qp.FormFieldCount = 0 The file test.pdf contains no information from any fields on it. |
|
![]() |
|
JanN ![]() Senior Member ![]() Joined: 29 Oct 05 Location: Germany Status: Offline Points: 116 |
![]() ![]() ![]() ![]() ![]() |
To be honest: I do not really know.
![]() |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store