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

TOPIC:

Saving Annotation (ink) on permanently on PDF 6 years 4 months ago #13225

  • rohitgarg2990
  • rohitgarg2990's Avatar
  • Offline
  • New Member
  • New Member
  • Posts: 17
  • Thank you received: 0
Hi Nermeen,

thanks for your reply. I tested that and it is working for windows but not for Mac. Can you please verify the same?

Regards,
Rohit Garg

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

Saving Annotation (ink) on permanently on PDF 6 years 4 months ago #13226

  • nermeen
  • nermeen's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 962
  • Thank you received: 87
Dear Rohit,

By Mac you mean the iOS version?
The method for annot flatting is returning false?

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

Saving Annotation (ink) on permanently on PDF 6 years 4 months ago #13231

  • rohitgarg2990
  • rohitgarg2990's Avatar
  • Offline
  • New Member
  • New Member
  • Posts: 17
  • Thank you received: 0
Hi Nermeen,
I mean when i open the saved pdf with annotation on windows laptop, i can not delete the annotation with pdf reader but when i open the same pdf on mac machine, i can remove it. Isn't it suppose to flat annotations for all the platforms?

Regards,
Rohit Garg

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

Saving Annotation (ink) on permanently on PDF 6 years 4 months ago #13232

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Thank you received: 65
Hi,
can you please send us the pdfs you used (before and after the flat)?
Can you please show us the code you use to flatten and save the pdf?

Thanks!

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

Saving Annotation (ink) on permanently on PDF 6 years 4 months ago #13238

  • rohitgarg2990
  • rohitgarg2990's Avatar
  • Offline
  • New Member
  • New Member
  • Posts: 17
  • Thank you received: 0
Hi Code is as follows, i will try to share the pdf as soon as possible.

Paint paint = m_ink.getM_paint();
paint.setStrokeWidth(width);
m_ink.setM_paint(paint);
m_status = STA_NONE;
if( m_annot_page != null )
{
Page page = m_doc.GetPage(m_annot_page.GetPageNo());
if( page != null )
{
// Annotation annot = page.GetAnnot(page.GetAnnotCount() - 1); //get last added annot
// annot.SetLocked(true);
page.ObjsStart();
Matrix mat = m_annot_page.CreateInvertMatrix(m_layout.vGetX(), m_layout.vGetY());
mat.TransformInk(m_ink);
page.AddAnnotInk(m_ink);
page.FlatAnnots();
mat.Destroy();
//add to redo/undo stack.
m_opstack.push(new OPAdd(m_annot_page.GetPageNo(), page, page.GetAnnotCount() - 1));
m_layout.vRenderSync(m_annot_page);
page.Close();
if( m_listener != null )
m_listener.OnPDFPageModified(m_annot_page.GetPageNo());
}
}
if( m_ink != null ) m_ink.Destroy();
m_ink = null;
m_annot_page = null;
invalidate();

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

Saving Annotation (ink) on permanently on PDF 6 years 4 months ago #13239

  • rohitgarg2990
  • rohitgarg2990's Avatar
  • Offline
  • New Member
  • New Member
  • Posts: 17
  • Thank you received: 0
my license is professional, for me, setLock is working for me for windows but not for iOS.. Do you get the idea or should i still share the pdf?

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

Powered by Kunena Forum