Risposta alle domande più comuni

Get OpenAction metadata using Advanced properties (iOS)
Ultimo aggiornamento 11 mesi fa

Using the Advanced properties, you can get the initial View mode (managed by Acrobat) from metadata, check the below code:

Note: a premium license is needed.

-(BOOL)existOpenActionInDoc:(PDFDoc *)m_doc

{

    NSString *viewMode = @"Fit";

    PDFObj *rootObj = [m_doc advanceGetObj:[m_doc advanceGetRef]];

    if (rootObj!=nil)

    {

        int count = [rootObj dictGetItemCount];

        for (int cur = 0; cur 0 && [[rootObj dictGetItemByIndex:0] getType] == 6)

                {

                    item = [rootObj dictGetItemByIndex:0];

                    int arrayCount = [item arrayGetItemCount];

                    if (arrayCount > 1)

                    {

                        viewMode = [[item arrayGetItem:1] getNameVal];

                        NSLog(@"%@", viewMode);

                        return YES;

                    }

                }

            }

        }

    }

    return NO;

}


Caricamento in corso ...