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 - Blank preview
  FAQ FAQ  Forum Search   Register Register  Login Login

Blank preview

 Post Reply Post Reply
Author
Message
Autodidact View Drop Down
Team Player
Team Player
Avatar

Joined: 03 Feb 06
Status: Offline
Points: 21
Post Options Post Options   Thanks (0) Thanks(0)   Quote Autodidact Quote  Post ReplyReply Direct Link To This Post Topic: Blank preview
    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..
Back to Top
marian_pascalau View Drop Down
Debenu Quick PDF Library Expert
Debenu Quick PDF Library Expert


Joined: 28 Mar 06
Location: Germany
Status: Offline
Points: 278
Post Options Post Options   Thanks (0) Thanks(0)   Quote marian_pascalau Quote  Post ReplyReply Direct Link To This Post Posted: 14 Dec 07 at 5:57AM

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 :-)
Back to Top
Autodidact View Drop Down
Team Player
Team Player
Avatar

Joined: 03 Feb 06
Status: Offline
Points: 21
Post Options Post Options   Thanks (0) Thanks(0)   Quote Autodidact Quote  Post ReplyReply Direct Link To This Post Posted: 17 Dec 07 at 6:58AM
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.


Back to Top
Autodidact View Drop Down
Team Player
Team Player
Avatar

Joined: 03 Feb 06
Status: Offline
Points: 21
Post Options Post Options   Thanks (0) Thanks(0)   Quote Autodidact Quote  Post ReplyReply Direct Link To This Post Posted: 17 Dec 07 at 7:14AM
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. Confused
Back to Top
chicks View Drop Down
Debenu Quick PDF Library Expert
Debenu Quick PDF Library Expert


Joined: 29 Oct 05
Location: United States
Status: Offline
Points: 251
Post Options Post Options   Thanks (0) Thanks(0)   Quote chicks Quote  Post ReplyReply Direct Link To This Post Posted: 17 Dec 07 at 6:39PM
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.
Back to Top
Autodidact View Drop Down
Team Player
Team Player
Avatar

Joined: 03 Feb 06
Status: Offline
Points: 21
Post Options Post Options   Thanks (0) Thanks(0)   Quote Autodidact Quote  Post ReplyReply Direct Link To This Post Posted: 18 Dec 07 at 2:25AM
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
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