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.

Mon Mar 19, 2018 2:26 am

Hello,

Thanks for your inquiry.
Which product do you use? The Spire.Doc or Spire.PDF? And what functions are you using? If you are doing conversion of Word to PDF, purchasing the license of Spire.Doc is sufficient, but if you also need to do some operations related to Spire.PDF, you need to purchase the Spire.Doc and Spire.PDF.

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1187
Joined: Tue Sep 27, 2016 1:06 am

Tue Oct 08, 2019 4:19 am

When I added the barcode to word, it showed up "The sample demonstrates how to insert an image into a document" , I don't want see it , please help me thank Sir

thienngoc
 
Posts: 7
Joined: Wed Sep 04, 2019 9:29 am

Tue Oct 08, 2019 5:48 am

Hi,

Thanks for your inquiry.
To help us investigate your issue accurately, please provide following information:
1. The input file(if any)
2. The barcode image
3. The code you were using
4. The output file you got

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Wed Oct 09, 2019 3:21 am

thank Sir
Currently , I use barcode-39 , i attached file output

thienngoc
 
Posts: 7
Joined: Wed Sep 04, 2019 9:29 am

Wed Oct 09, 2019 5:40 am

Hi,

Thanks for your output file.
How did you generate the output file? Could you please provide following issue to help us locate the reason of your issue?
1. The input file(if any)
2. The barcode image
3. The code you were using

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Wed Oct 09, 2019 10:00 am

Document document = new Document(@"filepath of file docx input");
Section section = document.Sections[0];
Paragraph paragraph = section.Paragraphs.Count > 0 ? section.Paragraphs[0] : section.AddParagraph();
paragraph.AppendText("The sample demonstrates how to insert an image into a document.");
paragraph.ApplyStyle(BuiltinStyle.Heading2);
paragraph = section.AddParagraph();
Bitmap p = new Bitmap(Image.FromFile(@"filepath of file image"));
//rotate image and insert image to word document

// p.RotateFlip(RotateFlipType.Rotate90FlipX);
DocPicture picture = document.Sections[0].Paragraphs[0].AppendPicture(p);
//set image's position
picture.HorizontalPosition = 400.0F;
picture.VerticalPosition = -5.0F;
//set image's size
picture.Width = 214;
picture.Height = 56;
//set textWrappingStyle with image;
// picture.TextWrappingStyle = TextWrappingStyle.Through;
//Save doc file.
document.SaveToFile(@"filepath of file docx", FileFormat.Doc);

-- the input file null , i created the barcode from text , i convert barcode from byte[] to image, after, i insert image into file docx.

thienngoc
 
Posts: 7
Joined: Wed Sep 04, 2019 9:29 am

Thu Oct 10, 2019 1:31 am

Hi,

Thanks for your information.
After checking your code, I found the text was written by the code paragraph.AppendText("The sample demonstrates how to insert an image into a document."). If you don't want to see the text, please remove it from your code.
Any question, welcome to get it back to us.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Thu Oct 10, 2019 2:31 am

thank Sir,

thienngoc
 
Posts: 7
Joined: Wed Sep 04, 2019 9:29 am

Thu Oct 10, 2019 2:55 am

Hi,

Thanks for your feedback.
Please feel free to contact us if there is any question.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Fri Oct 11, 2019 1:35 am

Hi Sir ,
how to set image location in file word ?
i use code :
DocPicture picture = document.Sections[0].Paragraphs[0].AppendPicture(p);
//set image's position
picture.HorizontalPosition = 400.0F;
picture.VerticalPosition = -5.0F;
but fail , i want setting image at the right but it location left in fie word, i don't understand
Sincerely
Thank Sir

thienngoc
 
Posts: 7
Joined: Wed Sep 04, 2019 9:29 am

Fri Oct 11, 2019 6:42 am

Hi,

Thanks for your inquiry.
Please also set the text wrapping style so that the image position could be set correctly. Below is the code for your reference.

Code: Select all
            //set the text wrapping style with image;
            picture.TextWrappingStyle = TextWrappingStyle.Square;


If the code couldn't solve your issue, to help us better investigate it, please offer us the following information.
1. Your input Word file(if any).
2. Your desired result file.
3. Your insert picture.
You could upload them here or send us(support@e-iceblue.com) via email.

Best wishes,
Amber
E-iceblue support team
User avatar

Amber.Gu
 
Posts: 525
Joined: Tue Jun 04, 2019 3:16 am

Fri Oct 11, 2019 7:16 am

Thank Sir
This is what I expected.

thienngoc
 
Posts: 7
Joined: Wed Sep 04, 2019 9:29 am

Fri Oct 11, 2019 7:22 am

Hi,

Thanks for your feedback.
Any question, welcome to contact us.

Best wishes,
Amber
E-iceblue support team
User avatar

Amber.Gu
 
Posts: 525
Joined: Tue Jun 04, 2019 3:16 am

Return to Spire.PDF