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!
Damaged PDF generated (Chapter II)... |
Post Reply |
Author | |
jabaltie
Senior Member Joined: 08 Nov 05 Location: Brazil Status: Offline Points: 138 |
Post Options
Thanks(0)
Posted: 12 Dec 07 at 10:13AM |
Hello !
I'm still suffering a lot with form field replacement & QuickPDF (see my other postings). I have a PDF template, which is a PDF with empty form fields and I "stuff" content into those fields grabbing this content from a database. So far, simple. What happens is that SOMETIMES, a damaged PDF is generated. I replaced QuickPDF inside my application by PDFTK, as Chicks suggested some time ago. When using PDFTK, under the SAME CIRCUMSTANCES, I get a perfectly fine PDF. As a matter of fact my application generates 2 PDFs : one via QuickPDF and now another one, via PDFTK, simultaneosly. That is, it generates two output files, one from each tool. I have supplied a kit : http://www.DES.online.unimep.br/au/pub/kitpdftk.zip There inside :
My conclusion is that there's a bug on QuickPDF field replacement or flattening. Someone can help me ? I see no other alternative but to replace QuickPDF by PDFTK, what I TOTALLY dislike.... My logic to replace fields on QUICKPDF is like this : LNT:=LOQPDF:FORMFIELDCOUNT() FOR LNI:=LNT TO 1 STEP -1 LCFNAME:=LOQPDF:GETFORMFIELDTITLE(LNI) IF EMPTY(LCFNAME) // SHOUT 'EMPTY FORM FIELD NAME' AND GET OUT END IF // SEARCHES FOR THIS FORM FIELD (LCFNAME) VALUE AND IF NOT FOUND, GET OUT IF (LNF:=ASCAN(LAPAGES[LNIPAGE,2],{|E,I| LCFNAME == E[1]})) == 0 // SHOUT 'FORM FIELD VALUE NOT FOUND' // GET OUT END IF LCFVALUE:=LAPAGES[LNIPAGE,2,LNF,2] IF LCFVALUE == NIL // SHOULD I HAVE A NULL FIELD VALUE, EMPTIES IT LCFVALUE := "" END IF IF NOT (LXRESULT:=LOQPDF:SETFORMFIELDVALUE(LNI,LCFVALUE)) == 1 // COULD NOT SET FORM FIELD VALUE // GET OUT END IF IF NOT (LXRESULT:=LOQPDF:FLATTENFORMFIELD(LNI)) == 1 // COULD NOT FLATTEN FORM FIELD // GET OUT END IF // BUILDS FDF FILE... LCFDF+="<<" + CRLF + ; "/T (■" + CHR(255) + CHARMIX(REPLICATE(CHR(0),LEN(LCFNAME)),LCFNAME) + ")" + CRLF + ; "/V (■" + CHR(255) + CHARMIX(REPLICATE(CHR(0),LEN(LCFVALUE)),LCFVALUE) + ")" + CRLF + ; ">>" + CRLF M->PCOLOG+=STRTRIM(PROCLINE()) + " CAMPO # " + STRTRIM(LNI) + " : " + LCFNAME + " / " + LCFVALUE + CRLF // BUILDS THE LOG FILE NEXT |
|
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