Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5987927
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:53:07+00:00 2026-05-22T22:53:07+00:00

I have an Excel template that I use to create PDF specification sheets for

  • 0

I have an Excel template that I use to create PDF specification sheets for our vendors. I can open, manipulate and export to a PDF file fine except when I insert a picture. This is the code I am using to add one picture

workSheet.Shapes.AddPicture(imagePath, Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoCTrue, 120, 700, image.Width, image.Height);

and this is the code to save the PDF file:

private void createPDF()
{
     if (File.Exists(path + basePart.Number + ".pdf"))
         File.Delete(path + basePart.Number + ".pdf");
     workBook.Saved = true;
     workSheet.ExportAsFixedFormat(Excel.XlFixedFormatType.xlTypePDF, path + basePart.Number, Excel.XlFixedFormatQuality.xlQualityStandard, true,
                false, Type.Missing, Type.Missing, true, Type.Missing);
     DisposeExcelInstance();
}

Without any images the PDF file saves fine. With images, the PDF file saves but cannot be opened. I have tried multiple PDF file readers just in case but sure enough none of them work.

EDIT:

I have tried various Excel formats and none have worked. It seems that ExportAsFixedFormat does not work with images, no matter how they get inserted into the document. Is there an alternative to this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T22:53:08+00:00Added an answer on May 22, 2026 at 10:53 pm

    Microsoft is to thank for this one. 6 hours of more or less banging my head against a wall testing on multiple computers with multiple file formats and PDF file tools I find out it is a compatibility issue with Excel 2010.

    I finally got a spare laptop so I could stop bugging other people to test things on their PCs and the laptop had Excel 2007 on it and it worked like a charm. The actual issue, believe it or not, is that when working with Excel 2007 (the version that the template had originally been built in) someone had put it into the “Page Layout” view, which worked on Excel 2007 and older when creating a PDF file with a picture in it.

    With Excel 2010 it will sometimes allow me to get away with the page layout view, but never with pictures. I wish I were making it up. I didn’t think the view really had anything to do with the the functionality of the spreadsheet. This is a very specific problem, but hopefully someday it saves someone a headache.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have several legacy & 3'd-party systems in organization that use several RDBMS vendors
I have Excel add-in which I add so many class modules that it is
We have an Excel 2002/XP based application that interacts with SQL 2000/5 to process
I have an excel file which has more than 65536 rows. However, I can
I have an Excel 2003 workbook that contains a macro to copy certain of
I have an excel sheet full of times. They are formatted so that they
I use VSTO Excel template based solutions frequently. One of the things I like
I seem to have a dilemma. I have an EXCEL 2003 template which users
Every time I create a new excel sheet, I have to go in and
I have a excel template(.xlt), and I want to do custom validation for this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.