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!
![]() |
Printing PDF results in blank print |
Post Reply ![]() |
Author | |
ryan.cole ![]() Beginner ![]() Joined: 23 Aug 10 Status: Offline Points: 10 |
![]() ![]() ![]() ![]() ![]() Posted: 23 Aug 10 at 8:47PM |
Hello,
I was using QuickPDF0719 and just updated to the QuickPDF0721. My following issue existed in both versions. I'm using QuickPDF to open and send a PDF to a printer driver. The printer driver then saves the print job as a TIFF image. I have tested printing PDFs to the print driver using Acrobat Reader and they come out fine. I am having a problem with QuickPDF, though. The resulting file from the print job is blank. It does end up being the correct number of pages, but all pages are blank. The PDF appears to have no embedded text, so it's just purely scanned images saved as PDF. I'm doing this in Delphi 2009. I will paste my code below. Does anyone know what could be the cause of this?
|
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
Hi Ryan!
Perhaps you can send me the file and i'll try to print it with QP. ...and i'm sure i can print it. PrintDocument is a very main function... If it won't work here would be many more posts like yours ;-) Cheers, Ingo |
|
![]() |
|
ryan.cole ![]() Beginner ![]() Joined: 23 Aug 10 Status: Offline Points: 10 |
![]() ![]() ![]() ![]() ![]() |
I was about to send to you the file, but was instructed by my co-workers that I probably shouldn't send it out. It's relatively sensitive data for us.
I've determined that the file does have JBIG2 compressed images in it, though. All pages are simply a large JBIG2 compressed image. That's why I think it's coming out entirely blank, but with the appropriate page count. (quickpdf doesnt support JBIG2, yet)
|
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
So we all hope/wait for 7.22 ;-)
|
|
![]() |
|
ACX1 ![]() Beginner ![]() Joined: 20 Sep 10 Status: Offline Points: 2 |
![]() ![]() ![]() ![]() ![]() |
Hello,
I have a similar problem. I downloaded QuickPDFLibrary version version 7.21 for evaluation.
What I need is a library for setting new values in already existing pdf files which contain form fields and then printing the files out.
The pdf files have been produced some time ago with Adobe Acrobat 5.0. There I inserted the form fields.
With QuickPDFLibrary 7.21 I was able to perform the value changes of the form fields. Also I could save the file. When viewing the changed pdf file in Adobe Acrobat 5.0 or Adobe Reader 9.0 everything seemed o.k.
The problem is, that if I print with QuickPDFLibrary the values of the form fields doesn't appear on the print-out.
I did several changes in the code, but I couldn't get the values on the print-out with QuickPDFLibrary 7.21.
The code looks like this:
lngLoadFromFile = QPDF.LoadFromFile(strPathFilename1)
lngSelectedDocument = QPDF.SelectedDocument Dim lngFindFormFieldByTitle As Long lngFindFormFieldByTitle = QPDF.FindFormFieldByTitle("FormatTeileNr") Call QPDF.SetFormFieldValue(lngFindFormFieldByTitle, strTeilenummer) Call QPDF.SetNeedAppearances(1) lngFormFieldPrintable = QPDF.SetFormFieldPrintable(lngFindFormFieldByTitle, 1)
lngFormFieldVisible = QPDF.SetFormFieldVisible(lngFindFormFieldByTitle, 1) lngSaveToFile = QPDF.SaveToFile(strPathFilename3)
lngRemoveDocument = QPDF.RemoveDocument(lngSelectedDocument) lngLoadFromFile = QPDF.LoadFromFile(strPathFilename3) lngSelectedDocument = QPDF.SelectedDocument lngPrintOptions = QPDF.PrintOptions(0, 0, strPathFilename2) Call QPDF.PrintDocument("Farbkopierer", 1, 1, lngPrintOptions) Thank you for any help regarding this problem.
|
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
Hi ACX1!
Use the advanced search functionality above with "SetNeedAppearance" ... you'll find many samples. Another thing: There can be differences if there are fields with the same name more than once in your pdf-form... Cheers and welcome here, Ingo |
|
![]() |
|
ACX1 ![]() Beginner ![]() Joined: 20 Sep 10 Status: Offline Points: 2 |
![]() ![]() ![]() ![]() ![]() |
Hi Ingo,
thank you for the information. I have found the necessary information as you told me to do.
The point is to use "UpdateAppearanceStream".
QP.SetNeedAppearances(1);
QP.SetFormFieldValueByTitle( FieldName, FieldValue ); nresult := QP.FindFormFieldByTitle(FieldName); QP.UpdateAppearanceStream(nresult); If nothing strange appears I will change to this library.
|
|
![]() |
|
fc0107 ![]() Beginner ![]() Joined: 19 Oct 10 Status: Offline Points: 2 |
![]() ![]() ![]() ![]() ![]() |
Hi there,
I'm evaluating the library, too, and just like for ACX1 I need to fill the form fields of some existing pdf's and print them. Using SetNeedAppearance and UpdateAppearanceStream is almost fine, but not sufficient for me. In fact, the values are printed, but the printed document just ignores the FormFieldComb and FormFieldMaxLen properties. I.e., I see the characters correctly spaced when I open or print the file with AcrobatReader or FoxitReader, but they are compressed when I print the file using QuickPDFLibrary. Is there something I am missing? Thanks a lot, Francesco |
|
![]() |
|
Rowan ![]() Moderator Group ![]() ![]() Joined: 10 Jan 09 Status: Offline Points: 398 |
![]() ![]() ![]() ![]() ![]() |
Hi Francesco,
Can you post the code that you're using with FormFieldComb and FormFieldMaxLen? Cheers, - Rowan.
|
|
![]() |
|
fc0107 ![]() Beginner ![]() Joined: 19 Oct 10 Status: Offline Points: 2 |
![]() ![]() ![]() ![]() ![]() |
Well,
the FormFieldComb and FormFieldMaxLen have been set in the PDF document using Acrobat, I tried to read them using GetFormFieldComb and FormFieldMaxLen, and the values I obtain are the ones I'm expecting. This is the code I'm using to write the content of the field: _pdfLibrary.SetFormFieldValue(10, "DONALD DUCK"); _pdfLibrary.UpdateAppearanceStream(10); if I check the result of _pdfLibrary.GetFormFieldValue(10) I obtain 1, and the result of _pdfLibrary.GetFormFieldMaxLen(10) is 30. Should I programmatically set these values or other properties? |
|
![]() |
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