Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about Android development and PDF
  • Page:
  • 1
  • 2

TOPIC:

How to move text at pdf? 8 years 1 month ago #10410

  • ankur123987
  • ankur123987's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
  • Available as freelancer (ex website to app 30min)
  • Posts: 97
  • Thank you received: 0
Hello support team,
I added text at pdf now the text is part of pdf. is it possible to move this added text? can you guide me?

if its not possible would it like to add in future release of library

Thanks

Please Log in or Create an account to join the conversation.

Last edit: by ankur123987.

How to move text at pdf? 8 years 1 month ago #10411

  • support
  • support's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 692
  • Thank you received: 59
Are you adding text as annotation or on the page?
If second we don't provide a way to alter page structure and we're not planning to introduce such features.

May you write the code you're adopting to add text?

Please Log in or Create an account to join the conversation.

How to move text at pdf? 8 years 1 month ago #10413

  • ankur123987
  • ankur123987's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
  • Available as freelancer (ex website to app 30min)
  • Posts: 97
  • Thank you received: 0
I am using following method
i am using following code for write the text
PageContent content = new PageContent();
content.Create();//create content, do not forget.
content.GSSave();
Matrix mat = new Matrix( 1, 1, 100, 500 );
content.GSSetMatrix(mat);
mat.Destroy();

Page page = m_doc.GetPage(0);

Document.DocFont dfont = m_doc.NewFontCID("DroidSansFallback", 1 | 8);//bold and embed in horizontal writing
ResFont rfont = page.AddResFont(dfont);

content.TextBegin();
content.TextSetFont(rfont, 20);//set font and size
content.SetFillColor(0xff0000);
content.SetStrokeColor(0x10);
content.TextSetCharSpace(0);
content.TextSetWordSpace(0.3f);
content.TextSetLeading(20);
content.TextSetRenderMode(2);//fill and stroke
content.TextSetHScale(120);//set horizontal scale
content.DrawText("RadaeePDF\rTest!");
content.TextEnd();
content.GSRestore();

//add content to page
page.AddContent(content, true);
content.Destroy();

page.Close();
thanks
can i move with the above method?

Please Log in or Create an account to join the conversation.

How to move text at pdf? 8 years 1 month ago #10414

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Thank you received: 65
Hi,
no with that code you can't move the text because it becomes part of the pdf content.

You can move text adding an annotation using that code: www.radaeepdf.com/support/knowledge-base...component&kbartid=43

Please Log in or Create an account to join the conversation.

How to move text at pdf? 8 years 1 month ago #10415

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1123
  • Thank you received: 73
another idea is:
draw rectangle with same color as background, cover the text.

Please Log in or Create an account to join the conversation.

How to move text at pdf? 8 years 1 month ago #10416

  • ankur123987
  • ankur123987's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
  • Available as freelancer (ex website to app 30min)
  • Posts: 97
  • Thank you received: 0
i think about edittext annotatiion as alternative but the problem with edittext are following
1 I posted in different thread of edittext the move code is not work with RDPDFreader module.
2 I have requirement to move date and time which are text . so for that i have to disable the click listener of this text how can i do it . so that this edit text does not change .
3 i have another requirement where user enter the text in blank edittext which initially size is wrap of 1 character as user enter the character in edittext its change the size and then this edittext is added the pdf

this is the following url for my queries
www.radaeepdf.com/forum/Android-developm...text-at-pdf?start=12

how can i do that ?

Please Log in or Create an account to join the conversation.

Last edit: by ankur123987.
  • Page:
  • 1
  • 2
Powered by Kunena Forum