Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Thu Jun 23, 2016 8:15 am

Hi i am trying to create a PDFdocument from a memory stream, however when converting the fpd only contains half the data and is missing the graphs?

please see below the code being used

Thanks.

*****

var pdfConverter = new PdfConverter(excelStream);
var pdfDocument = new Spire.Pdf.PdfDocument();

pdfDocument = pdfConverter.Convert();
pdfDocument.SaveToFile(@"C:\Temp\EnergyAlarms\Converted.pdf");
pdfDocument.Close();

Tom360
 
Posts: 15
Joined: Tue Apr 12, 2016 8:21 am

Thu Jun 23, 2016 8:22 am

Hi,

Thanks for your posting.
Please try this solution.
http://www.e-iceblue.com/Tutorials/Spir ... o-PDF.html

If the issue still exists, please share your excel fle for investigation. You can also send your excel file to support@e-iceblue.com if it is inconvenience to share here.

Best Regards,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2774
Joined: Wed Jun 27, 2012 8:50 am

Thu Jun 23, 2016 8:33 am

Thank you very much this works! Is there any options to only include certain worksheets, and how to set the page margins. As seen by the attatched file when converted the data is only using half the document width,

Tom360
 
Posts: 15
Joined: Tue Apr 12, 2016 8:21 am

Thu Jun 23, 2016 9:01 am

Hi,

Please attach your excel file.
Thank you.

Best Regards,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2774
Joined: Wed Jun 27, 2012 8:50 am

Thu Jun 23, 2016 9:06 am

Hi,

Please find the attached file i am using.

Tom360
 
Posts: 15
Joined: Tue Apr 12, 2016 8:21 am

Thu Jun 23, 2016 9:34 am

Hi,

The print area of your excel file itself is B5:M150 so it should be the result you converted, and it also has the same result using Excel to do the conversion. Please refer to the following tutorial to set pdf margins.
http://www.e-iceblue.com/Tutorials/Spir ... B.NET.html
You can use the below solution to convert certain sheet to PDF.
Code: Select all
 Workbook book = new Workbook();
            book.LoadFromFile(input);
         
            book.Worksheets[0].SaveToPdf("1.pdf");


Best Regards,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2774
Joined: Wed Jun 27, 2012 8:50 am

Thu Jun 30, 2016 6:58 am

Hi,

Has your issue been resolved?
Thank you for your feedback in advance.

Best Regards,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2774
Joined: Wed Jun 27, 2012 8:50 am

Thu Jun 30, 2016 8:21 am

Hi,

Thank you very much, yes this issue has been fixed.

Thank you.

Tom360
 
Posts: 15
Joined: Tue Apr 12, 2016 8:21 am

Thu Jun 30, 2016 8:32 am

Hi,

Glad to hear that.
Welcome to write to us again if you need further assistance.

Best Regards,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2774
Joined: Wed Jun 27, 2012 8:50 am

Return to Spire.PDF