We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Clone content PDF to PDF

I have one PDF file that is business card. I want to duplicate the card to many cards insite one PDF file.

EX: Input:1 card , output 9 cards, matrix 3x3 (one page on one pdf).
Is Aspose support it?
Thanks.

Hi Phuong,


Thanks for your inquiry. You can convert your PDF to image and then add image into PDF page using table object to achieve your requirement. Hopefully it will help you to accomplish the task.

However, if there is any difference in your requirement and my understanding then please share some more details along with your input and intended PDF sample, so we will further look into it and will guide you accordingly.

string outFile = “ImageinTable.pdf”;<o:p></o:p>

string inFile = "aspose_pdf.jpg";

FileStream fs = new FileStream(inFile, FileMode.Open, FileAccess.Read);

Aspose.Pdf.Document doc = new Aspose.Pdf.Document();

Aspose.Pdf.Image img = new Aspose.Pdf.Image();

//img.FixHeight = img.FixWidth = 45;

img.HorizontalAlignment = HorizontalAlignment.Center;

//img.File = inFile;

img.ImageStream = fs;

Aspose.Pdf.Table table = new Aspose.Pdf.Table();

for (int i = 1; i < 4;i++ )

{

Aspose.Pdf.Row row = table.Rows.Add();

for (int j = 1; j < 4; j++)

{

Aspose.Pdf.Cell cell = row.Cells.Add();

cell.IsWordWrapped = false;

cell.VerticalAlignment = VerticalAlignment.Center;

cell.Alignment = HorizontalAlignment.Left;

cell.Paragraphs.Add(img);

}

}

Page page = doc.Pages.Add();

page.Paragraphs.Add(table);

doc.Save(outFile);


Best Regards,

Great. That’s what I need.

Thank Tilal.