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 - Adding TextBox
  FAQ FAQ  Forum Search   Register Register  Login Login

Adding TextBox

 Post Reply Post Reply
Author
Message
Stephen0838 View Drop Down
Beginner
Beginner
Avatar

Joined: 06 Dec 05
Location: United States
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote Stephen0838 Quote  Post ReplyReply Direct Link To This Post Topic: Adding TextBox
    Posted: 06 Dec 05 at 4:24PM

I am working in vc++6 and am having an issue.

What I am dooing is a batch process. The process is.
Open each PDF
Increse the size of the page by adding .5 inch to the top
Draw a black Square .5 x .5 Inches.
Write the document number in the box in White.
Save The document
Merge all Documents with MergeFast
Open the resulting Document and add a bookmark for each document added to the final PDF.

The issue affects only some PDF documents the .5 inch header is added but it is gray instead of white (Prints white) and the box and text is not added.

So far I have seen this mainly with PDF's created with Pixiel Translations.

Code of the method that is giving issues is below.

 {
CSECiSEDDLL ISED; //Custom Wrapper on methods I use from DLL
 DecryptPDF(filename);
 long  rv;
 long doclen; //length of document
 long doc1_id; //document ID
 double pageh; //pageHeight
 double pageW; //pageWidth
 long i;
 bool rotated;

 
 rv = ISED.LoadFromFile(const_cast <char *> (filename.c_str()));
 if (rv == 1)
 {
  doc1_id = ISED.SelectedDocument();
  ISED.SetMeasurementUnits(2);
  ISED.SetOrigin(origin); //2
  doclen = ISED.PageCount();
  for(i=1; i <= doclen; i++)
  {
   //select page
   ISED.SelectPage(i);
   //increase page size
   pageh = ISED.PageHeight();
   pageW = ISED.PageWidth();
   rotated = false;
   if(autorotate)
   {
    if(pageW > pageh)
    {
     ISED.RotatePage(270);
     pageh = ISED.PageHeight();
     pageW = ISED.PageWidth();
     rotated = true;
    }
   }
   
   pageh += add_to_height; //.6
   pageW += add_to_Width; //0
   ISED.SetPageDimensions(pageW, pageh);
   //addnumber
   if(boxopt.drawbox)
   {
    ISED.SetFillColor(boxopt.BoxRed, boxopt.BoxGreen, boxopt.BoxBlue);
    ISED.SetLineColor(boxopt.BoxRed, boxopt.BoxGreen, boxopt.BoxBlue);
    ISED.DrawBox(boxopt.Left, boxopt.Top, boxopt.Width, boxopt.Height, boxopt.DrawOptions);
   }
   ISED.SetTextAlign(Textopt.TextAlign);
   ISED.SetTextSize(Textopt.TextSize);
   ISED.SetTextColor(Textopt.TextRed, Textopt.TextGreen, Textopt.TextBlue);
   ISED.DrawText(Textopt.XPos, Textopt.YPos, const_cast <char *> (text.c_str()));
   if (rotated)
   {
    ISED.RotatePage(90);
   }
  }
  ISED.SaveToFile (const_cast <char *> (filename.c_str()));
 }
}

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