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 adding text to a existing PDF file |
Post Reply ![]() |
Author | |
Tharos ![]() Beginner ![]() Joined: 28 Dec 10 Status: Offline Points: 16 |
![]() ![]() ![]() ![]() ![]() Posted: 05 Jan 11 at 9:06AM |
Hii everyone:
I have other problem with my pdfs. I´m adding a Watermark in PDF like this: for (int i = 1; i <= paginas; i++) { try { QP.SelectPage(i); int capa1=QP.NewLayer(); QP.SetTextSize(20); QP.SetTextColor(255, 0, 0); QP.SetTransparency(50); QP.DrawRotatedText(80,250,45,"Distribución Limitada"); int OC1 = QP.NewOptionalContentGroup("Conf"); QP.SetLayerOptional(OC1); QP.MoveLayer(descriptor, 1); QP.SetOptionalContentGroupVisible(OC1, 0); QP.SetOptionalContentGroupPrintable(OC1, 1); } After this treatment, I have my pdfs with watermark but, in some pdf file the text is correct and in ohters files the text is flipped, as a mirror of the original text. For Example: Image with the text CORRECT: ![]() Image with the text INCORRECT: ![]() I dont now why the instruction "DrawRotatedText" modifiy this text in some pdf files. I Have done proofs changing position text, angle of rotation.. and nothing!! the image is not correct!!. Somebody knows a solution? Thanks!!!! |
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
Hi!
So the pdf-documents are already rotated before... At the beginning/before drawing anything anywhere you should determine where you want to start: Try SetOrigin You should read here: http://www.quickpdflibrary.com/help/quickpdf/MeasurementAndCoordinateUnits.php Cheers, Ingo |
|
![]() |
|
Tharos ![]() Beginner ![]() Joined: 28 Dec 10 Status: Offline Points: 16 |
![]() ![]() ![]() ![]() ![]() |
thanks for the fast reply. I put the instruction before DrawingText, but only change the position of the text but, it still appear wrong...
Edited by Tharos - 05 Jan 11 at 9:42AM |
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
You have to check directly into the pdf-content (best to read it into a stream or string once) if there's a string "rotate". If it's so then you have to change your watermark.
Cheers, Ingo |
|
![]() |
|
Tharos ![]() Beginner ![]() Joined: 28 Dec 10 Status: Offline Points: 16 |
![]() ![]() ![]() ![]() ![]() |
in my pdf-content?? there are only words and searching in that document, the string or the word "rotate" doesnt exist.
You say that i have to read all the pdf using a stream (for example in VIsual Studio) and find the string rotate?? If searching in that document, I dont found the word it is not necessary to read the document arround a stream, does not? I dont understand.... |
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
Hi!
The REAL content! Open the pdf with notepad and you'll know what i mean. |
|
![]() |
|
Tharos ![]() Beginner ![]() Joined: 28 Dec 10 Status: Offline Points: 16 |
![]() ![]() ![]() ![]() ![]() |
the word "Rotated" or "Rotate" or any possible similar word does not exist in the document.... whats happened now??
Thanks! |
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
Hi!
So you should upload the prob-pdf and a detailed error-description on the official support forum at www.quickpdflibrary.com Cheers, Ingo |
|
![]() |
|
Tharos ![]() Beginner ![]() Joined: 28 Dec 10 Status: Offline Points: 16 |
![]() ![]() ![]() ![]() ![]() |
where? I dont find these forum..
Cheers! PD: here is the pdf that causes problem using the code write in this post. http://www.host-files.com/i/download.php?file=848Watermark.pdf Edited by Tharos - 07 Jan 11 at 9:49AM |
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
Tharos!
Where? Here: www.quickpdflibrary.com ... then "support" ... then ... Cheers, Ingo |
|
![]() |
|
Tharos ![]() Beginner ![]() Joined: 28 Dec 10 Status: Offline Points: 16 |
![]() ![]() ![]() ![]() ![]() |
OK i know but if I go to support and then forum, the page that appear is the index of this forum... what link is??
|
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
Ok...
I've looked again for you: http://www.quickpdflibrary.com/support/support-query.php |
|
![]() |
|
Tharos ![]() Beginner ![]() Joined: 28 Dec 10 Status: Offline Points: 16 |
![]() ![]() ![]() ![]() ![]() |
thanks thats works!! I send the problem and now waiting for an answer...
cheers!!! |
|
![]() |
|
Dimitry ![]() Team Player ![]() Joined: 18 Feb 10 Status: Offline Points: 37 |
![]() ![]() ![]() ![]() ![]() |
Please try to use
QP.CombineLayers();
for each page, before adding new text.
|
|
Regards,
Dmitry |
|
![]() |
|
Jhon ![]() Beginner ![]() ![]() Joined: 10 Oct 10 Status: Offline Points: 6 |
![]() ![]() ![]() ![]() ![]() |
Hi:
i have same problems, even you use SetOrigin, the Origin is not same in some pdf files. if you SetOrigin(0), the Origin is top left in some pdf files, but is bottom left in other pdf files. i try to use CombineLayers(); but the problem is same. every one can help me? |
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
Hi!
The keyword could be "rotated" ... Please read the thread from beginning ;-) ...or upload some samples. Cheers, Ingo |
|
![]() |
|
Dimitry ![]() Team Player ![]() Joined: 18 Feb 10 Status: Offline Points: 37 |
![]() ![]() ![]() ![]() ![]() |
Before making changes inside page we should define co-ordinate system using SetOrigin().
Also page can be rotated using RotatePage().
And before applying changes to existing PDF we should obviously check existing rotation for each page using PageRotation().
|
|
Regards,
Dmitry |
|
![]() |
|
AndrewC ![]() Moderator Group ![]() ![]() Joined: 08 Dec 10 Location: Geelong, Aust Status: Offline Points: 841 |
![]() ![]() ![]() ![]() ![]() |
We have added a function called NormalizePage() that should fix all of these types of issues. If you want to add text or other content to a PDF then you should add a call to QP.NormalizePage(0); after calling QP.SelectPage(). 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