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!
Problems drawing on a PDF |
Post Reply |
Author | |
Kudermann
Beginner Joined: 02 Aug 13 Status: Offline Points: 3 |
Post Options
Thanks(0)
Posted: 02 Aug 13 at 11:23AM |
Hi,
i have a PDF where the function DrawBox returns 1. But there is nothing painted on the PDF after i save it and open it. The security info of the document show me the following results: Security Method: None User Password: No Owner Password: No Printing: Fully Allowed Changing the Document: Allowed Content Copying or Extraction: Allowed Authoring Comments and Form Fields: Allowed Form Field Fill-in or Signing: Allowed Content Accessibility Enabled: Allowed Document Assembly: Allowed Encryption Level: Blank Opened with User password: No Opened with Owner password: No Variable Encryption Strength: None The DrawBox functions works perfect for other PDFs with the same security info results. Only this PDF doesnt work. Now the question: what can be the reason for this behaviour and how can i check it? I am using Debenu Quick PDF Library 9.15 No problem to upload the PDF for further tests. Jutta Kudermann |
|
AndrewC
Moderator Group Joined: 08 Dec 10 Location: Geelong, Aust Status: Offline Points: 841 |
Post Options
Thanks(0)
|
Jutta,
Can you try calling QP.NormalizePage(0); before calling DrawBox ? If it works then NormalizePage will need to be be called once for each page that you want to use DrawBox, DrawText etc.. Andrew.
|
|
Kudermann
Beginner Joined: 02 Aug 13 Status: Offline Points: 3 |
Post Options
Thanks(0)
|
Hi Andrew,
thank you very much! Thats the solution. Jutta |
|
Eric24
Team Player Joined: 28 Jun 09 Location: Dallas, TX Status: Offline Points: 29 |
Post Options
Thanks(0)
|
Just curious, but why is this is the solution?
|
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
Cause there's something special with this single pdf.
Something curious happened while creating ... who knows? We don't have this pdf - so we won't know. But this all doesn't matter cause we've a main medecine "NormalizePage" ;-) Edited by Ingo - 18 Aug 13 at 10:09PM |
|
AndrewC
Moderator Group Joined: 08 Dec 10 Location: Geelong, Aust Status: Offline Points: 841 |
Post Options
Thanks(0)
|
Eric, PDF files were never designed to be manipulated. They were almost designed as a readonly format until people want to start doing useful things with their PDF files such as splitting, merging, stamping etc.. NormalizePage is designed to place SaveState/RestoreState commands at the start and end of the contentstream(s) respectively so that the drawing state is known and can be trusted. NormalizePage works on 99.9% of problem PDF's and it generally recommended to be called before adding any text, graphics or logos to an existing PDF file. Sometimes PDF producers add more SaveState calls than RestoreState calls so NormalizePage(1) will attempt to count and then balance out the Save/Restore calls. Andrew. |
|
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