[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
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
Medium Priority
?
118 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 30

Accepted Solution

by:
anarki_jimbel earned 2000 total points
ID: 41815105
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
ID: 41815418
Thank, that work, created new folder as PDFBIN which automatically placed onto obj. The properties make all the difference.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Cancel future meetings from user mailboxes in Office 365 using Remove-CalendarEvents
If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
This video shows where to find templates, what they are used for, and how to create and save a custom template using Microsoft Word.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

656 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