Solved

VS2015, C#, where to place PDF file into resource so it release to include PDF and how to reference to them to open?

Posted on 2016-09-25
2
42 Views
Last Modified: 2016-09-25
I have several PDF files that ia generated from Word documnet. I like to include PDF into project and make reference to them. I cannot place it into resource folder since it only for graphic element files.

I like a best solution to open the PDF file by external 3rd party viewer. I do not wish to make use of internal PDF veiwer within the C# project.
0
Comment
Question by:Richard Payne
2 Comments
 
LVL 29

Accepted Solution

by:
anarki_jimbel earned 500 total points
Comment Utility
One way I know is like below:

a) E.g., drag and drop a pdf file to the solutions explorer, or include it to the solution by any other way;
b) Select the file in the solutions explorer, then open and modify it's properties like:
 - Build Action: Content;
 - Copy to Output Directory: Copy always
c) The path to the file after the application is installed should be like:
  string path = Application.StartupPath + "\\MyPDF.pdf".
or may be like (can't remember exactly)
Application.StartupPath + "\\Resources\\MyPDF.pdf";
1
 

Author Closing Comment

by:Richard Payne
Comment Utility
Thank, that work, created new folder as PDFBIN which automatically placed onto obj. The properties make all the difference.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
In this article we discuss how to recover the missing Outlook 2011 for Mac data like Emails and Contacts manually.
This video shows the viewer how to set up and create Footnotes in their document. Click on the References tab: Select "Insert Footnote": Type in desired text:
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now