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!
Blank preview |
Post Reply |
Author | |
Autodidact
Team Player Joined: 03 Feb 06 Status: Offline Points: 21 |
Post Options
Thanks(0)
Posted: 10 Dec 07 at 6:51AM |
I'm testing critical functionality of the ActiveX library (5.22) before turning down or going for making a web-application. The application is to make users select a template, change some text and see a preview before approving the changes to be saved in a new file, ready for printing..
Initially I tested the SavePagePreview function that seem to work as expected, but in the second round of test where I'm using a premade PDF and altering the value of a form field - the render is totally white/blank. After further testing I'm able to have it render added/drawn text, but the rest of the content already in the file (text, image and form field) are not rendered. This is unfortunately a showstopper, so I'm in need for some help/advice.. BTW; I have tried the RenderDocumentToFile function as well, but that function has a serious limitation as it seem to ignore / not use the setting of temp path/file. It seems to generate a temporary file in the system32 folder - something the webhost never will allow to give rights to.. |
|
marian_pascalau
Debenu Quick PDF Library Expert Joined: 28 Mar 06 Location: Germany Status: Offline Points: 278 |
Post Options
Thanks(0)
|
Whe using QuickPDF with Web or with a normal Exe there is no difference other then "hosting" environmen. Can you please provide a sample program (in form of source code), written in C++, C#, VB, VBS or Delphi and send it to
support(at)quickpdf.org.
I will check your problem when I will have some free time.
Regards :-)
|
|
Autodidact
Team Player Joined: 03 Feb 06 Status: Offline Points: 21 |
Post Options
Thanks(0)
|
I intended to clean up the ASP test-code and make some structured notes before gracefully taking your generous offer Marian. As I did, I managed to have the RenderPreviewToFile work as intended without it complaining about the lack of access-rights to the system32 folder. I also checked the access-rights to the folder, and it was not left escalated from my previous testing.
Happy as I was, I scrapped all ASP.NET testing (although I expect some challenges there too later on), and ventured on to see if I could manage to have it render the content of the form-fields as well, and I did - using the FlattenFormField function. The code did not change and flatten all fields (function returned 0), but for some weird reason, moving the code lines (order of fields being changed - they are actually changed by name. not index) it did change, flatten and render all fields.. 8o) Now I need to check the current test-code on another computer and then request my web host to install/register the ActiveX so I can test it live. |
|
Autodidact
Team Player Joined: 03 Feb 06 Status: Offline Points: 21 |
Post Options
Thanks(0)
|
Yepp, there is something weird with the order the form fields are changed and flattened! Did a test with the following code;
Dim X For X = 1 To 3 RetVal = QP1.SetFormFieldValue( X, Now() ) Response.Write( RetVal ) RetVal = QP1.FlattenFormField( X ) Response.Write( RetVal & "<br>") Next gives the output: 11 11 00 (not changed, or flattened - thus not rendered) While .. Dim X For X = 3 To 1 step -1 RetVal = QP1.SetFormFieldValue( X, Now() ) Response.Write( RetVal ) RetVal = QP1.FlattenFormField( X ) Response.Write( RetVal & "<br>") Next Works as expected. |
|
chicks
Debenu Quick PDF Library Expert Joined: 29 Oct 05 Location: United States Status: Offline Points: 251 |
Post Options
Thanks(0)
|
It's not weird, but expected behavior.
When you flatten a field, it no longer exists in the PDF document. Therefore, if you flatten what had been referred to as index #1, the field that was previously #2 is now #1, etc. The correct methods are to flatten from last to first, or to always flatten field #1 if going from first to last. |
|
Autodidact
Team Player Joined: 03 Feb 06 Status: Offline Points: 21 |
Post Options
Thanks(0)
|
Now that you mention it, that makes perfect sense - to me as well. I wish such little "easy to miss" obviousness could be mention a little clearer in the documentation.. The line "The form field will then be removed from the document.." did not quite trigger the thought of the index also being changed.
Thank you! Edited by Autodidact - 18 Dec 07 at 2:25AM |
|
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