(iPhone) How to open a bundled PDF in Safari?

I have a PDF I'm bundling with my iPhone app. I want to be able to tell Safari to open it using the URL system (or whatever else that might work), like for example:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: [[NSBundle mainBundle] pathForResource: @"mypdf.pdf" ofType:@""]]];
I just can't find any information on how to do it. Also if I split that command in multiple parts to ease the debugging, I see that the string returned by the NSBundle call (which is a valid path) is not accepted by the NSURL constructor, hence resulting in a nil URL.
Any help?
Thanks!

I can't answer the Safari question but here's another option for your application. The Quartz framework allows you to open and render PDF documents. Look at the Quartz 2D Programming Guide and look at the QuartzDemo sample app.
This would allow you to display the PDF directly in your app. Just a thought.

Similar Messages

  • How to open document to PDF from ALV

    Hi ,
      how to open document to PDF from ALV on clicking (hot spot)
    urgent
    thanks,

    something like this:
    line_fieldcat-fieldname = 'vbeln'.
    line_fieldcat-ref_tabname = 'I_vbeln'.
    line_fieldcat-hotspot = 'X'. " Shows the field as ahotspot.
    line_fieldcat-seltext_m = 'Notification '.
    APPEND line_fieldcat TO i_fieldcat.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    i_callback_program = ws_repid
    i_callback_user_command = 'MY_USER_COMMAND'
    and rest of parameters,
    FORM MY_USER_COMMAND USING ucomm LIKE sy-ucomm
    selfield TYPE slis_selfield.
    IF ucomm = '(Function code of action, say click, or enter'
    CASE selfield-fieldname.
    WHEN 'QMNUM'. "Notification
    IF i_tab-qmnum NE space.
       CALL FUNCTION 'WS_EXECUTE'
          EXPORTING
            commandline = '/F /IM "ACRORD32.EXE"'
            program     = 'TASKKILL'.
    ENDIF.

  • Hello! I just want to know how to open a document (.pdf or .doc).

    I have looked at Labview\vi.lib\platform\browser.llb\Open a Document on Disk.vi but the vi has many subvi's. It works well but when I  build a new application I always get errors when I try to open the document. Thank you.

    Altenbach....  we're gonna start calling you "Hawkeye" 
    There was not much info on the other post other than tst's reply..  I'll check it out..
    Thanks buddy!
    RayR
    EDIT PORTION:
    Humm...  the titles were similar....  "Hello! I just want to know how to open a document (.pdf or .doc) after the press of a control button. Thank you."
    But you're right.. nothing mentioned about a build..  >> SORRY: Not Duplicate Post <<
    Message Edited by JoeLabView on 09-21-2007 11:38 AM

  • How to open and save PDF from web?

    I can't see how to open a PDF in adobe from safari

    This should help:
    http://forums.adobe.com/docs/DOC-2532

  • How to open and read pdf and micrsoft word (.doc) files or documents

    My problem is how to use my BB 9800 software version 6.0.0.546 to read/view pdf files and microsoft office documents. I have also bought documents to go from online and have installed it on my phone, but whenever i try to open it I receive a message that it is incompactible. Any help will be greatly appreciated.

    Hi, Sammy.
    Why not install a 3rd party PDF reader and Word Doc reader to help open and read pdf and micrsoft word (.doc) files or documents? You can google it and select one whose way of processing is simple and fast to help you with the related converting work.  It will be better if it is totally manual and can be customized by users according to our own favors. Remember to check its free trial package first if possible. I hope you success. Good luck.
    Best regards,
    Arron

  • How to open-up a pdf file to a particular page via java? (file and page number from another program)

    I have created an Access 2003 Form. Data is entered. The data can be viewed once entered in the same form format, with one addition. The addition is a link to another program where we store files. The files stored are pdf documents. Each document is a scanned file (500+ pages). The link can open-up the pdf file. I want the link to open-up the pdf file to a particular page. I will supply the page number from the database.
    I am aware of Adobe Acrobat 7.0 PDF Open Parameters using a URL that specifies the file to be opened plus actions to be performed once the file is openend (i.e. http://example.org/doc.pdf#page=3). However, the 3rd party program transfers a file from a server to the client via java. The file does not go via a web browser. The java code transfer the file directly from the file server to the the client.
    Any idea how to accomplish the task of viewing a particular page with the process flow described?
    I am using Adobe Acrobat 7.0 Professional.

    So you are reading this file in a standalone version of Acrobat? If so then use the PDF Open Parameters /a option via the command line.
    Sabian
    Example:
    C:\Program Files\Adobe\Acrobat 7.0\Acrobat>Acrobat.exe /A "zoom=1000=OpenActions" "C:\Program Files\Adobe\Acrobat 7.0\Acrobat\SimpleSubmit.pdf"
    Where:
    Path to Acrobat: C:\Program Files\Adobe\Acrobat 7.0\Acrobat>Acrobat.exe
    Note: The example starts in the Acrobat application directory
    Switch: /A
    Parameter Syntax: "zoom=1000=OpenActions"
    Path to file: "C:\Program Files\Adobe\Acrobat 7.0\Acrobat\SimpleSubmit.pdf"
    Note: The quotes are very important for the syntax to work appropriately.

  • Data present in  internal table, now how to open it in PDF format

    Dear Friends,
    my Scenario is..
    I have uploaded a pdf file in my database table through  GUI_UPLOAD. It is uploaded.
    Now when user click on some button then that file should be displayed again in pdf format directly.
    (No download to user PC using GUI_download or something)
    DBtab ZTST_XL Format
    MANDT     MANDT     CLNT     3
    KEYA     CHAR5     CHAR     5
    KEY2     INT4     INT4     10
    LENGTH     INT2     INT2     5
    DATA          LCHR     1000
    I brought that data again in my internal table by 
    SELECT * FROM ZTST_XL
        INTO TABLE DBTAB
        WHERE KEYA = 'TEST'.
      LOOP AT DBTAB.
        ITAB-DATA = DBTAB-DATA.
        APPEND ITAB.
      ENDLOOP.
    Now I need to open this PDF file in normal format as it opens usually rather than downloading it on users PC .
    Any Help regarding this will be very much useful
    Thanks & Regards,
    Sourabh

    >
    Sourabh Jain wrote:
    > Dear Suhas,
    > Sorry for Confusion,
    > Actually I was trying to say that ,, I have already uploaded that pdf file to my database table on click of first button,
    > now on click of second button I have to show/open that uploaded pdf file.
    So you just want to show the PDF file you have uploaded to the DB on click of the 2nd button.
    Now you can use the method CL_GUI_FRONTEND_SERVICES=>EXECUTE for this after the user clicks the 2nd button
    CALL METHOD cl_gui_frontend_services=>execute
          EXPORTING
            DOCUMENT              = lv_document "The filepath you have used for GUI_UPLOAD
          EXCEPTIONS
            cntl_error             = 1
            error_no_gui           = 2
            bad_parameter          = 3
            file_not_found         = 4
            path_not_found         = 5
            file_extension_unknown = 6
            error_execute_failed   = 7
            synchronous_failed     = 8
            not_supported_by_gui   = 9
            OTHERS                 = 10.
    Hope i am clear.
    BR,
    Suhas

  • How to open Password proteced PDFs ?

    Hi,
    I have some work related PDFs with me which are password protected. I can access it via Adobe from my Windows PC at work. At home I usually use Preview to open PDF files, but unable to use it to open password protected PDFs. Any workaround to open them without installing Adobe ?

    I have opened secure PDF files with preview multiple times. I would like to ask you a few questions to get a better idea of what is happening with your situation. With it being password protected is it an automatic authentication that takes place at work, or do you know the password? What happens when you try to open it on your Mac?

  • Unable to open password protected PDF in safari

    Dear all, I'm new in using iPhone safari. I have problem in opening password protected PDF file from safari. Do you have any solution or workaround to resolve this problem
    Regards
    BR

    You can put pretty much any character into the encryption password for a PDF file apart from control codes (carriage returns, backspaces, etc), but whether the vendor's website can is another matter!
    As you seem to have a PDF with a user password that isn't what you expected, there's nothing you can do to remove it other than perhaps trying a version without the quote characters, or with a backslash in front of the quote (it's possible they escaped the string on the login form in preparation for storing it in a database, and forgot to unescape it again).

  • Problem opening Form based PDF via Safari browser with Adobe Reader 9.3 on MAC

    Hi,
    I'm mentioning below the problem that we are facing when we open a form based PDF created using a licensed version of Adobe Livecycle Designer ES (Version 8.2.1.4029.1.523496) on a MAC machine through a Safari Browser.
    We tested this PDF form on a windows machine and the PDF opens in an IE browser via the latest Adobe reader 9.3 without any problem. I then received complaints by our clients that they were unable to open the same PDF on their Safari browser on a MAC machine, I tried to resolve the problem by downloading the latest version of Adobe Reader 9.3 for MAC but noticed that the Safari browser window would just keep refreshing the page without displaying the PDF at all. I then uninstalled the Adobe Reader 9.3 version and downloaded and installed an older version i.e., Abobe Reader 8.2 version for MAC and noticed that the PDF document successfully opened in the Safari browser. My question is why does a form based PDF work with an older version of Adobe Reader for MAC and not with the latest version? Our clients are not comfortable with the fact that we are refraining them from upgrading to the latest version of Adobe Reader for MAC and that they would have to downgrade their existing Adobe Reader 9.3 to a lower version Adobe Reader 8.2 in order for the PDF forms to work when it should be the other way around.
    Is there any fix or a patch that is currently being worked on that would resolve this issue in the latest Adobe Reader for MAC? If yes then when would it be ready? This issue is quite critical for our business and would appreciate it if this would be looked into with high priority.
    Thanks and Regards,
    Sheikh Huraiz Ahmed.

    That suggestion makes sense and likely works, but only if the user is on a machine that will allow them to use Reader. I'm sending this out to a lot of teachers, who are using machines either at school, or are school-issued machines, and they don't have the admin privileges to install software-- even Reader.
    so my problem is, if they are stuck on a machine without Reader, and without the possibility of having Reader... it's just not going to work because Preview can't handle these functions.
    And, since that is not an acceptable answer with what I'm trying to do... I will find another way to create/submit forms. I think there are some online possibilities I will have to make work.
    very, very disappointing and frustrating.
    Kristi

  • How to open a new tab in safari

    how do i open a new tab in safari and how do i copy and paste a simple sentence?

    If choose to Show Tab Bar, then there will be a + sign on the right hand end of the Tab Bar, to Create a new tab.

  • How to automatically ensure printing pdf in safari does not crop content

    I realized today that printing  and saving as pdf in safari has been cropping my content. I dont know when this change occured or why, but at some point in time, content I've saved from safari by printing and saving as pdf has cropped the pages.
    Is there a way to make sure that printing in safari selects a page size that automatically does NOT crop the content. As it stands now it automatically selects US paper size and that crops all my bank statements. I can put in a custom size buts its really inconcenient to have to do that every time. And every time, it reverts back to US paper. This was never a problem for me in the past and I'm not sure whats changed.
    thanks

    Just to update, even if I select a custom size in print settings for the computer, safari automatically goes to US paper. Even if I select to scale content to fit, it still crops the content.
    I've also trashed Library/Preferences/com.apple.print.PrintingPrefs.plist

  • How can open a html, pdf files from the server (c:\foldername\filename)

    Hi all,
    I am developing an application. in this app i have to implement RMI.
    My problem is this, How can a client open a files from the server.
    all the html, pdf files are stored in the server's directory like C:\audit\filename.
    There is a folder on the server's C directory which contains all the html , pdf files.
    please tell me how can a client open a file from the server using RMI.
    Please send me the solution as soon as possible.
    Thanks & Regards
    Bhavishya

    That's doing it the hard way. Why not use HTTP or FTP?

  • How to open an Arabic PDF in Illustrator CS3 ME without outlining the font?

    Hi,
    I need to use Illustrator CS3 ME (Middle East) in order to edit some pages of an Arabic PDF file.
    Now, the problem is that as soon as I open the page in Illustrator, all of the Arabic text gets outlined. The English text doesn't get outlined.
    I need to edit the text, so this is a big problem.
    I don't have the original source files (InDesign).
    Also, it is too much editing to be doing in Acrobat.
    Is there some sort of solution for this?
    Thanks,
    Ola

    Hi,
    The font is Arial, which fully supports Arabic, as far as I know.
    How do I enable glyph protection in the prefs?
    How do I set the glyph substituion in the type palette? I am sorry for the
    ignorance, but I usually work with InDesign, and quite rarely with
    Ilustrator. This is a special case for me...
    The formatting is very ordinary. Nothing special.
    I really hope there is some solution for this....
    Ola
    2010/6/4 Mylenium <[email protected]>
    What fonts does it use? Is glyph protection enabled in teh prefs? What are
    the settings for glyph substitution in the type palette? Does it have any
    specific formatting? If it gets outlined, it was probably mangled in ways
    that prevent using the life font or the relevant font is missing
    alltogether...
    >
    Mylenium
    >

  • How to open hyperlink of PDF file uploaded at SharePoint(hosted at Office365) in 'Adobe Acrobat' for annotation and comments.

    Hi,
    I've a hyperlink of PDF file which is uploaded under SharePoint Document library(hosted at Office365 E1) on my custom '../SitePages/Approver.aspx'. Once user click on that hyperlink it should ask me to "Check-Out & Open' pdf file directly from sharePoint document library then it should automatically gets opened into 'Adobe Acrobat' where user will do some annotation/ comments in that pdf file & again 'Check-In' back his changes to SharePoint Document library.
    Following article will explain how I want to Check-In & Check-Out  pdf files from SharePoint document library once i click hyperlink on my '../SitePages/Approver.aspx' page.
    acrobatusers.com/tutorials/how-to-work-with-sharepoint-and-office-365
    Please let me know how to achieve this functionality using office 365.
    Your assistance would be greatly appreciated as this is top-priority requirement for us.
    Yours sincerely,
    Mahesh Sherkar
    [signature deleted by host]

    For instance, the forms.conf file:
    # Virtual path mapping for Forms Java jar and class files (codebase)
    AliasMatch ^/forms/java/(..*) "D:\Oradev/forms/java/$1"
    # Virtual path for JInitiator downloadable executable and download page
    AliasMatch ^/forms/jinitiator/(..*) "D:\Oradev/jinit/$1"
    # Virtual path for runform.htm (used to run a form for testing purposes)
    AliasMatch ^/forms/html/(..*) "d:\oradev/tools/web/html/$1"
    # Virtual Path for icons
    AliasMatch ^/forms/icons/(..*) "d:\icons/$1"
    ...you can move your files in one of the existing physical directories - e.g: d:/icons - and call them with the following:
    Web.show_Document('/forms/icons/document.pdf','_blank');But you can also add your own virtual/physical directory:
    # Virtual Path for documents
    AliasMatch ^/forms/documents/(..*) "d:\documents/$1"
    ...with the following code:
    Web.show_Document('/forms/documents/document.pdf','_blank');Francois

Maybe you are looking for

  • Sharing music between iPods with different iTunes accounts

    My wife bought a 2nd gen (?) 4G nano, plugged it into our home computer and synced it to my daughter's iTunes account. However, she wants to create her own iTunes account ... she doesn't care for all of my daughter's music, and she wants to download/

  • File path control-how to avoid the user to change the path string

    Hi all, I'm using "File path control" to chose file name. I don't want the user to write the path in the control directly (by typing) but only to choose the file via the button on the right. I can implement this behaviour with path indicator and butt

  • F110 - Document Not selected

    Hi All, Payment was made for a particular document in 2008 and reversed. In current year we are trying to make payment  with new payment method by changing in the document. The document is not being picked up in APP and there are no errors shown in t

  • CPU not showing up in System Profiler

    Hi, I have a 4 year old Dual 2.5 GHz G5 which I think has had a CPU failure (B CPU). The system profiler states that I only have one, not two CPU's. Is it a case of using a repair CD to reset the lost CPU or is it dead? Any ideas anyone? Thanks in ad

  • Segregate internal ordered items from purch. order items for the i-pro user

    We want to know if there are any Oracle i-Procurement implementations that have segregated the internally ordered items via an Order Management sales order from items ordered on a PO (purchase order). We have considered three possible paths to purse.