Android SDK - Problems

瀏覽次數:54 次
跳到第一則未讀訊息

Siddharth Shah

未讀,
2015年1月13日 清晨7:14:222015/1/13
收件者:pdfne...@googlegroups.com
Hi,
I am using pdfnet sdk for android, and I am facing few problems.

- When I am using "Free Text " annotation, the enclosing box, which appears when we select the annotation, is bigger then the actual text inside it.(It's looking weird) 
- The same enclosing box has a grey color translucent background. Can I change it's opacity and color.
- Another thing is, when we move the annotations on the doc, the page blurs, it's not a smooth rendering.

Thank you in advance. :)

Cheers,
Siddharth

Ryan

未讀,
2015年1月13日 下午6:35:242015/1/13
收件者:pdfne...@googlegroups.com
- When I am using "Free Text " annotation, the enclosing box, which appears when we select the annotation, is bigger then the actual text inside it.(It's looking weird) 
The free text annotations don't really guarantee a minimal size. That being said, you should provide a screen shot showing what you mean, and what you expect to see.
  
- The same enclosing box has a grey color translucent background. Can I change it's opacity and color.
Yes, you can modify the calls to Annots.Markup.SetOpacity and Annots.Markup.SetInteriorColorCompNum and Annots.Markup.SetInteriorColor methods in the tools code. 
 
- Another thing is, when we move the annotations on the doc, the page blurs, it's not a smooth rendering.
This is probably a complex document, that takes a long time to render, so you see a lower resolution placeholder instead.
 

Siddharth Shah

未讀,
2015年1月13日 晚上10:44:542015/1/13
收件者:pdfne...@googlegroups.com
Hey Ryan,
Thanks for the quick reply. I have attached to screenshots. Please take a look at them. For free hand drawings I am using Stamp annotation and for text I am using FreeText annotations.
Sorry for so many questions. :|

Regards, 
Siddharth
This is what I get.png
What I am expecting.png

Siddharth Shah

未讀,
2015年1月14日 凌晨12:07:142015/1/14
收件者:pdfne...@googlegroups.com
Hi Ryan,
Sorry, but I couldn't find the code where you want me to change "Annots.Markup.SetOpacity and Annots.Markup.SetInteriorColorCompNum and Annots.Markup.SetInteriorColor methods in the tools code". Please check and elaborate. 

Ryan

未讀,
2015年1月14日 下午2:15:342015/1/14
收件者:pdfne...@googlegroups.com
For FreeText look at the FreeTextCreate.java file.

Search for
"editor.putFloat(getOpacityKey(ToolManager.e_text_create), mOpacity);"
"mOpacity = settings.getFloat(getOpacityKey(ToolManager.e_text_create), Tool.PREFS_FREETEXT_OPACITY_DEFAULT);"
and
"freeText.setOpacity(mOpacity)"

that should get you started.

Ryan

未讀,
2015年1月14日 晚上7:44:432015/1/14
收件者:pdfne...@googlegroups.com
My colleague pointed out a few more things.

For the FreeText bounding box there is a fixed buffer value that inflates the box. See FreeTextCreate.java createFreeText() for value.

As for the grey color you are talking about, perhaps you are referring to the UI element as the user is editing the annotation. If so that is not part of the PDF annotation itself, but instead part of the UI element for editing. See AnnotEdit.java, onDraw()
回覆所有人
回覆作者
轉寄
0 則新訊息