- Posts: 17
- Thank you received: 0
Microsoft Windows Phone 8.1 support ends (13 Jul 2017)
Microsoft has ended support for Windows Phone 8.1
Questions about Android development and PDF
Saving Annotation (ink) on permanently on PDF
- rohitgarg2990
- Offline
- New Member
-
Less
More
IP: 192.168.0.71
8 years 9 months ago #13225
by rohitgarg2990
Replied by rohitgarg2990 on topic Saving Annotation (ink) on permanently on PDF
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
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
IP: 192.168.0.71
8 years 9 months ago #13226
by nermeen
Replied by nermeen on topic Saving Annotation (ink) on permanently on PDF
Dear Rohit,
By Mac you mean the iOS version?
The method for annot flatting is returning false?
By Mac you mean the iOS version?
The method for annot flatting is returning false?
- rohitgarg2990
- Offline
- New Member
-
Less
More
- Posts: 17
- Thank you received: 0
IP: 192.168.0.71
8 years 9 months ago #13231
by rohitgarg2990
Replied by rohitgarg2990 on topic Saving Annotation (ink) on permanently on PDF
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
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
IP: 192.168.0.71
8 years 9 months ago #13232
by Davide
Replied by Davide on topic Saving Annotation (ink) on permanently on PDF
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!
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!
- rohitgarg2990
- Offline
- New Member
-
Less
More
- Posts: 17
- Thank you received: 0
IP: 192.168.0.71
8 years 9 months ago #13238
by rohitgarg2990
Replied by rohitgarg2990 on topic Saving Annotation (ink) on permanently on PDF
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();
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();
- rohitgarg2990
- Offline
- New Member
-
Less
More
- Posts: 17
- Thank you received: 0
IP: 192.168.0.71
8 years 9 months ago #13239
by rohitgarg2990
Replied by rohitgarg2990 on topic Saving Annotation (ink) on permanently on PDF
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?
Time to create page: 0.555 seconds