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

TOPIC:

getStrokeColor and setStrokeColor 8 years 10 months ago #9151

  • fcimaschi
  • fcimaschi's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 2
  • Thank you received: 0
Hi,
The PDF in attachment has an Acro form with red border: the border is not rendered in PDFView.
if I try to get the stroke color programmatically with getStrokeColor I always receive 0.
Setting it with setStrokeColor and then read it with getStrokeColor always returns 0.

Here's my code:
PDF_ERR err = 0;
    PDFDoc* document = [[PDFDoc alloc] init];
    err = [document open:templatePath :nil];
    if(err == err_ok)
    {
        int pagecount = [document pageCount];
        PDFPage* page;
        for(int i = 0; i < pagecount; i++)
        {
            page = [document page:i];
            [page objsStart];
            int annotcount = [page annotCount];
            PDFAnnot* ann;
            for(int k = 0; k < annotcount; k++)
            {
                ann = [page annotAtIndex:k];
                int c = [ann getStrokeColor];
                GALog(@"1) %x", c);
                [ann setStrokeColor:0x88888888];
                c = [ann getStrokeColor];
                GALog(@"2) %x", c);
            }
       }
}
Attachments:

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

getStrokeColor and setStrokeColor 8 years 10 months ago #9162

  • emanuele
  • emanuele's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 580
  • Thank you received: 67
Hi,

we're checking your issue.
we will let you know as soon as possible.

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

getStrokeColor and setStrokeColor 8 years 9 months ago #9199

  • fcimaschi
  • fcimaschi's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 2
  • Thank you received: 0
Hi Emauele,
any news about my issue?

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

getStrokeColor and setStrokeColor 8 years 9 months ago #9200

  • emanuele
  • emanuele's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 580
  • Thank you received: 67
Hi,

pdf fields don't include tags like "border color" or "border width", these type of element are added by Adobe using widgets.
At the moment we’re evaluating how to better handle and render that widgets.
Adobe widgets are not included in the standard pdf syntax documentation, and also other rendering tools, like MacOSX (Preview), don't show that widgets.

At the moment, you can use getStrokeColor and setStrokeColor methods only with free text annot type, but we are working to support also the other types.

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

Last edit: by emanuele.
  • Page:
  • 1
Powered by Kunena Forum