Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Fri Jan 25, 2019 7:08 am

hi,
i m trying to print credit card size personal identification card,
so my template word doc is exact size of credit card, i want to set backgroud for card, after all,
i m exporting it as doc and pdf file, but in pdf file there is no bacgroud picture may be it changes the image position...
this is my code:

Document document = new Document();
document.LoadFromFile("PERKART" + Path.DirectorySeparatorChar + "PERKART.docx", FileFormat.Docx2010);

document.Background.Type = BackgroundType.Picture;
document.Background.Picture = Image.FromFile("PERKART//" + "PERKARTFRONT.JPG");

document.SaveToFile(PERKARTResultPath, Spire.Doc.FileFormat.Docx2010);
document.SaveToFile(PERKARTResultPathPDF, Spire.Doc.FileFormat.PDF);
System.Diagnostics.Process.Start(PERKARTResultPath);
System.Diagnostics.Process.Start(PERKARTResultPathPDF);

document.Close();

kasimdmr
 
Posts: 6
Joined: Thu Mar 15, 2018 11:04 am

Fri Jan 25, 2019 8:35 am

Hi kasimdmr,

Thanks for your inquiry.
I have reproduced your issue and posted it to our DEV team for fixing. If there is any update, we will let you know. Apologize for the inconvenience.

Sincerely,
Anna
E-iceblue support team
User avatar

Anna.Zhang
 
Posts: 73
Joined: Thu Sep 27, 2018 3:20 am

Sat Feb 02, 2019 2:49 am

Hi,

Thanks for your patient waiting.
Glad to inform you that the background picture issue has been fixed. Welcome to download the hotfix from the following link.
Website link: Spire.Doc Pack(hot fix) Version:7.1.19
Nuget link: https://www.nuget.org/packages/Spire.Doc/

Sincerely,
Anna
E-iceblue support team
User avatar

Anna.Zhang
 
Posts: 73
Joined: Thu Sep 27, 2018 3:20 am

Mon Mar 04, 2019 8:08 am

Hi,

Greetings from E-iceblue.
Have you tried the hotfix?
Your feedback would be greatly appreciated!

Sincerely,
Anna
E-iceblue support team
User avatar

Anna.Zhang
 
Posts: 73
Joined: Thu Sep 27, 2018 3:20 am

Return to Spire.Doc

cron