Hi, I’ve looked at all the examples and can find no example of producing labels via Aspose PDF (not via Words). Here below is a short VB program that uses floating boxes since this will ensure that label contents will be contained within a pre-defined area and fixed to a specific location. Trouble is that the top left label is fine but the top right label appears on a new page. Also, if the text does exceed the box size it then appears on the next page! Please can you advise the best way to get labels at fixed positions and that any excess is lost rather than messing up another label. Finally, once the labels come from a data source, there needs to be a better way than creating floating boxes for every label. For info the labels in use are LP14 99 (2 across, 7 down). Thank you
Dim PDFdoc As New Aspose.Pdf.Document("Label Planet LP14 99 Portrait.pdf") 'this has the outline of labels just for testing
Dim PDFPageInfo As Aspose.Pdf.PageInfo = PDFdoc.PageInfo
Dim PDFmarginInfo As Aspose.Pdf.MarginInfo = PDFPageInfo.Margin
PDFmarginInfo.Left = 36
PDFmarginInfo.Right = 36
PDFmarginInfo.Top = 48
PDFmarginInfo.Bottom = 48
Dim box As New Aspose.Pdf.FloatingBox(250, 100)
box.Top = 0
box.Left = 0
box.Paragraphs.Add(New Aspose.Pdf.Text.TextFragment("Name" & vbCrLf & "Job title" & vbCrLf & "Department" & vbCrLf & "CompanyCompanyCompanyCompanyCompanyCompanyCompany" & vbCrLf & "Address1" & vbCrLf & "Address2" & vbCrLf & "Address3" & vbCrLf & "Town" & vbCrLf & "County" & vbCrLf & "Postcode" & vbCrLf & "Country"))
PDFdoc.Pages(1).Paragraphs().Add(box)
Dim box2 = New Aspose.Pdf.FloatingBox(250, 100)
box2.Top = 0
box2.Left = 300
box2.Paragraphs.Add(New Aspose.Pdf.Text.TextFragment("Name" & vbCrLf & "Job title" & vbCrLf & "Department" & vbCrLf & "CompanyCompanyCompanyCompanyCompanyCompanyCompany" & vbCrLf & "Address1" & vbCrLf & "Address2" & vbCrLf & "Address3" & vbCrLf & "Town" & vbCrLf & "County" & vbCrLf & "Postcode" & vbCrLf & "Country"))
PDFdoc.Pages(1).Paragraphs().Add(box2)
PDFdoc.Save("Label sample.pdf")