Method Community

 

Link a Static PDF to Print from a Button

Last post 11-01-2010 8:25 AM by jnoneiliv1. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 08-12-2009 10:07 AM

    • IJA
    • Top 500 Contributor
    • Joined on 08-11-2009
    • Posts 10

    Link a Static PDF to Print from a Button

    How can you link a static PDF document to print from a click action on a button?

     

  • 08-12-2009 1:31 PM In reply to

    Re: Link a Static PDF to Print from a Button

    Hi Ian,

    If I understand your question correctly, you want to know if you can click on a button like a Print Preview and then it brings up a PDF document for you to print, the answer is yes. Provided you have created the report(PDF document) for the button to generate. If this is not what you are looking for let me know.

  • 08-12-2009 1:37 PM In reply to

    Re: Link a Static PDF to Print from a Button

    Just to add to my last post, if you like an example you can take a look at the Print Preview button on the Invoice page, this would help you.

  • 10-31-2010 11:13 AM In reply to

    • jnoneiliv1
    • Top 50 Contributor
    • Joined on 05-17-2010
    • Richmond, Virginia, USA
    • Posts 171

    Re: Link a Static PDF to Print from a Button

    IJA,


    Did you ever get an answer to this or find a solution?

    I am trying to do something similiar.  I have engineering drawings in pdf format that I want to attach to Item records.  The Attachment object type appears to have no other functionality than attaching the file.  It recognizes pdf file type and presents an Adobe icon, but this object type does not have the ability to create Actions, etc. so you can't DO anything with the attachment, like view it, print it, or download it to the PC client.

    So, what I wanted to do was to generate a Report that would just open the attachment and display it in the standard pdf view window.  I could embed the Report or use a button to Generate Report.

    But, alas, I cannot get a Report properly designed to do this.  Amanda's suggestion is not helpful in this case as the Invoice Preview creates a pdf report from Text data in the typical fashion, and what you and I are trying to do is view or print a previously generated (static) pdf document.  Apples and Oranges.

    It's been over a year, so I hope you haven't given up.

    Cheers,

    James

    James ONeil
    O. K. Foundry Co., Inc.
    1005 Commerce Rd.
    Richmond, Virginia 23224
  • 10-31-2010 12:55 PM In reply to

    Re: Link a Static PDF to Print from a Button

    James -

    "It recognizes pdf file type and presents an Adobe icon, but this object type does not have the ability to create Actions, etc. so you can't DO anything with the attachment, like view it, print it, or download it to the PC client."
    -This isn't true, though, or at least it is not how it is supposed work.  By clicking on the PDF icon it should launch it automatically in the browser so that you can view it, save it, print it, etc............otherwise.......it would be pretty useless!!!

    But if it is a static PDF and you want to do more with it, you could use the Load Web Page action. Where do you have this PDF file?  Could you put it on your website?

    I just tried this:

    1. Create a button labeled "Show PDF".

    2. Put the "Load Web Page" action on the button, which is found under the SCREEN heading.

    3. Put the URL as http://www.ibm.com/ibm/licensing/patents/pledgedpatents.pdf (just some random PDF I grabbed from Google).

    4. Made it open in a new window.

    5. Tested it out. Worked perfectly.

    The only problem is that it requires the PDF to be outside of Method, rather than an attached document.  In the Document Library in Method you can add as attachment as a linked URL (like above), or upload it to Method.  So as long as the documents were located somewhere with a valid URL, you could do this.  I don't think this is exactly what you want, but it's a bit closer.

    Paul

  • 11-01-2010 8:25 AM In reply to

    • jnoneiliv1
    • Top 50 Contributor
    • Joined on 05-17-2010
    • Richmond, Virginia, USA
    • Posts 171

    Re: Link a Static PDF to Print from a Button

    Paul,

    The "Load Web Page" solution could be a clever workaround.  I thought that possibly there might be a way to use an action to send the Attachment to the Web Browser to be opened, but I can't find an action that passes the Attachment data into another web session.  I would like to be able to keep the Attachments in Method rather than storing them externally.

    When I click on the Adobe icon of the Attachment in the Method Screen, another Method Screen is launched in a new tab, unattached without the Active Record.

    I am thinking that the current implementation of the Attachment Object type might be correct.  In that Method would not necessarily know what kind of Attachment will be stored in the blob data type.  It would be nice to be able to have some options like the Print Grid, or Export Grid to Excel options, but the Attachment Object does not allow configuration of ANY actions.

    But, I think Method may really already have the solution for this built in.  It should be possible to create an Embedded Report on the Screen, or to Generate a Report from a button.  But, I just can't get this work, yet.

    The Picture control as implemented by the Report Designer would appear to have the capability of rendering ANY picture type in the Report, and it also appears to have properties to bind the control to a data member of the dataset for the report.  The Picture control even includes the option to use a hyperlink for the picture.

    I have tried this a bunch of different ways, and just can't get it to work.  But, the Webinars for Reports are extensive and well done, and I haven't watched them yet.

    I think there should be some support for standard Actions on the Attachment Object, but I wouldn't think further development time for managing printing and presentation would be justified since the Report Designer and the standard Actions may provide all the functionality required in standardized implementation scenario.

    I would be very helpful if a more experienced Report designer could try this.

    I may also try implementing the Doc Library, but I want a very simple way to upload just a few Attachments bound to Items, possibly standardized to PDF for viewing and printing in the adopted Adobe window, and the additional functionality of the Doc Library may be more than what I want the user to see.  These are just engineering drawings of the parts we use.

    Cheers,

    James

    James ONeil
    O. K. Foundry Co., Inc.
    1005 Commerce Rd.
    Richmond, Virginia 23224
Page 1 of 1 (6 items)