Label Printing Project

Hi,

I am working on a label printing project and I need some information if my project proposal is do-able or not. I am not a technical person, so I have no idea about the processes behind the scene.

Project Background:
I want our application to be able to create 2 different types of labels in one page.
Label Printing steps:

  1. Users will be provided with check boxes where they can select the fields they want for the desired label.
  2. One patient will have two types of labels. a) Chart Labels - Patient Name , Patient Id b) Regular Label - Pt. Name, ID, Client, DOB, Gender etc
  3. Product used: Avery 5160 template. (MS Word)
  4. Users will be able print labels for all the patients at one time. Ex: 10 patients
  5. To avoid human errors, one patient info will go on one page. Patient A and B labels cannot be in the same page.
  6. Patient A can have 02 Chart Labels and 10 Regular labels.
  7. Chart Labels should be printed as the first two labels. Ex: Row 1 Column 1 and Row 2 Column 2 should have the cart labels and the rest can be regular labels.
  8. Condition: It is not in every case that a user will be printing 02 chart labels. Ex: User is printing labels for 10 patients. 03 of them will have a combination of Chart labels + Regular labels. The rest will only have regular labels or only 2 chart lables.

Question:

  • Is it possible for me to perform step 4 to 8?
  • Does Aspose give the flexibility for a user to print a mix combination of the labels? If yes how? Provide a technical doc or a code which I could share with my developer.
  • Can I get a read only version of word as the preview;
  • In a read only word doc can a user change the label format? Ex: User 1 wants to use Avery 5160, User 2 wants to use Avery 2170 or a product which has almost similar dimensions where they can fit the data without bleeding. Data selected will not be changing, but the label dimension change should show up to the user.

Between, my company is a Aspose resisted user.

Thank You!!!

Hi there,

Thanks for your inquiry.

Vanessac_1:
Is it possible for me to perform step 4 to 8?

Yes, you can achieve your requirements by uisng Aspose.Words. Please manually create your expected Word document using Microsoft Word and attach it here for our reference. We will investigate, how you want your final Word output be generated like. We will then provide you more information on this along with code.

Vanessac_1:
Does Aspose give the flexibility for a user to print a mix combination of the labels? If yes how? Provide a technical doc or a code which I could share with my developer.

You can achieve this requirement. In this case, you need to create your template document according to your requirements. I suggest you please read following documentation link.
https://docs.aspose.com/words/net/mail-merge-and-reporting/
https://docs.aspose.com/words/net/types-of-mail-merge-operations/

Please check the following code example for creating labels. I have attached the input Doc and Northwind.mdb with this post for your kind reference.

Document doc = new Document(MyDir + "MailingLabelsDemo.doc");
// Open the database connection.
string connString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" +
    DatabaseDir + "Northwind.mdb";
OleDbConnection conn = new OleDbConnection(connString);
conn.Open();
// Open the data reader.
OleDbCommand cmd = new OleDbCommand("SELECT TOP 50 * FROM Customers ORDER BY Country, CompanyName", conn);
OleDbDataReader dataReader = cmd.ExecuteReader();
// Perform the mail merge
doc.MailMerge.Execute(dataReader);
// Close database.
dataReader.Close();
conn.Close();
doc.Save(MyDir + "MailMerge.ExecuteDataReader Out.doc");

Please check the following code example for creating labels.

Vanessac_1:
Can I get a read only version of word as the preview;

Yes, you can save your final document as read only document. Please use Document.Protect Method (ProtectionType) to protect the document.

Document doc = new Document(MyDir + "in.docx");
doc.Protect(ProtectionType.ReadOnly);
doc.Save(MyDir + "Protect Out.docx");

You can also save your final document to image file foramt e.g png, jpg, tiff to preview the document. Please check the following code example.

Document doc = new Document(MyDir + "Rendering.doc");
ImageSaveOptions options = new ImageSaveOptions(SaveFormat.Png);
options.Resolution = 300;
options.PageCount = 1;
doc.Save(MyDir + "Rendering.SaveToImageResolution Out.png", options);

Vanessac_1:
In a read only word doc can a user change the label format?

Could you please share some detail about read only document?

Vanessac_1:
Ex: User 1 wants to use Avery 5160, User 2 wants to use Avery 2170 or a product which has almost similar dimensions where they can fit the data without bleeding. Data selected will not be changing, but the label dimension change should show up to the user.

In this case, I suggest you please use the IF field in your template to check which label you want to select according to IF condition. I suggest you please check following forum thread for your kind reference.
https://forum.aspose.com/t/60346