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 > General Discussion
  New Posts New Posts RSS Feed - Edit PDF Text
  FAQ FAQ  Forum Search   Register Register  Login Login

Edit PDF Text

 Post Reply Post Reply
Author
Message
nzcivic View Drop Down
Beginner
Beginner


Joined: 22 Mar 10
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote nzcivic Quote  Post ReplyReply Direct Link To This Post Topic: Edit PDF Text
    Posted: 22 Mar 10 at 1:30AM
Hi,

I want to be able to find and edit text on a page...

I understand I can use the GetPageText to find the text I'm after, Now that I have the location etc... i need to edit the text.

What is the best way...

Can the text be edited directly?

Can I recreate a new PDF with all the existing content except the "text" and then draw my new text? If so how?

Thanks,


Edited by nzcivic - 22 Mar 10 at 1:34AM
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 22 Mar 10 at 7:18AM
Hi!

You can't edit the textcontent directly.
You can extract the text and many pdf-properties, edit the extracted text and try to build a similar pdf-document.
"If so... how": Here, in the general section you can find a thread "The first steps...". There you can read all you need.

Cheers and welcome here,
Ingo
Back to Top
nzcivic View Drop Down
Beginner
Beginner


Joined: 22 Mar 10
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote nzcivic Quote  Post ReplyReply Direct Link To This Post Posted: 22 Mar 10 at 11:50AM
Hi,

I have noticed that the GetPageText function returns the color in RGB even though my text in the PDF is saved as CMYK

What is the best way to convert the RGB to CMYK?

I use the following function below... but what I would like to know is the function used by Quick PDF to convert CMYK to RGB? that way it can be reversed to preserve color

    public class Cmyk
    {
        public double C { get; set; }
        public double M { get; set; }
        public double Y { get; set; }
        public double K { get; set; }

        public Cmyk(double r, double g, double b)
        {
            double R = 1.0 - r;
            double G = 1.0 - g;
            double B = 1.0 - b;

            if (R < G)
            {
                K = R;
            }
            else
            {
                K = G;
            }
            if (B < K)
            {
                K = B;
            }

            C = CalcCmyk(r, K);
            M = CalcCmyk(g, K);
            Y = CalcCmyk(b, K);
        }

        private static double CalcCmyk(double rgb, double k)
        {
            if (((1 - rgb - k) <= 0) || ((1 - k) <= 0))
            {
                return 0;
            }
            return (1 - rgb - k) / (1 - k);
        }
    }

Will this preserve the color 100%

Thanks,
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