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.

Fri Apr 17, 2015 12:15 pm

Hello

I have a problem, when I try to attach a file to a pdf document

When I create a new pdf document the attachment works just fine
Code: Select all
var doc = new PdfDocument();

var attachment = new PdfAttachment(attachmentFilename);
attachment.Data = File.ReadAllBytes(attachmentFilename);
attachment.Description = "Some PDF File.";
attachment.MimeType = "application/pdf";
doc.Attachments.Add(attachment);

doc.SaveToFile(outputFilename);
doc.Close();


but in the other case when I want to add an attachment to an existing pdf document
doc.Attachments is not initialized at all!
Code: Select all
var doc = new PdfDocument();
doc.LoadFromFile(pdfFilename, FileFormat.PDF);


What am I doing wrong?

alexius
 
Posts: 1
Joined: Fri Apr 17, 2015 12:09 pm

Mon Apr 20, 2015 3:01 am

Hello,

Thanks for your inquiry.
I have reproduced your issue. And I have posted the issue to our dev team. We will inform you when it is fixed. sorry for the inconvenience.

Sincerely,
Sweety

E-iceblue support team
User avatar

sweety1
 
Posts: 539
Joined: Wed Mar 11, 2015 1:14 am

Fri Sep 18, 2015 3:53 am

Hello,

Sorry to keep you waiting.
The new version of Spire.Pdf ( Spire.PDF Pack(Hot Fix) Version:3.5.51 ) solved your issue has been released. Please download it via link below and have a try.
http://www.e-iceblue.com/Download/download-pdf-for-net-now.html

Best Regards,
Sweety
E-iceblue support team
User avatar

sweety1
 
Posts: 539
Joined: Wed Mar 11, 2015 1:14 am

Mon Sep 21, 2015 6:44 am

Hello,

Have you tried the Spire.PDF Pack(Hot Fix) Version:3.5.51?
Has your issue been resolved?
Thanks for your feedback.

Best Regards,
Sweety
E-iceblue support team
User avatar

sweety1
 
Posts: 539
Joined: Wed Mar 11, 2015 1:14 am

Return to Spire.PDF