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

Free Support Forum - aspose.com

Add a 3D PDF as attachment to a new PDF

Hi,

Is it possible to insert/merge a 3D pdf as input to a new PDF with Aspose.PDF?

Kind regards,
Phap Nguyen

3D.zip (1.1 KB)

@phapnguyen

Is it your expected output that you shared? OR do you want to add it inside an empty document? OR do you want to add a 3D Object inside PDF? Please share a bit more details about your requirements so that we can share related information with you.

Hi Asad,

I have a 3D PDF and I have a text PDF. My requirement is to insert the 3D PDF into the existing text PDF at a certain page. Is that possible?

Kind regards,
Phap Nguyen

@phapnguyen

You can please try adding PdfFileStamp using the code below in order to achieve your requirements:

Facades.PdfFileStamp fileStamp = new Facades.PdfFileStamp();
fileStamp.BindPdf(dataDir + "original_doc.pdf");
Aspose.Pdf.Facades.Stamp stamp = new Aspose.Pdf.Facades.Stamp();
stamp.BindPdf(dataDir + "stamp.pdf", 1);
stamp.SetOrigin(20, 20);
stamp.IsBackground = false;
fileStamp.AddStamp(stamp);
fileStamp.Save(dataDir + "output21.1.pdf");
fileStamp.Close();

Hi Asad,

With your code above a 3D PDF can not be stamped. See my 3D attachment which can not be stamped.

Kind regards,
Phap Nguyen

Please unzip the attachment to see the 3D pdf.
input3D.zip (29.3 KB)

@phapnguyen

Would you please also share the generated PDF output at your end? We will further proceed to assist you accordingly. Also, please share an expected output PDF as well.

Hi Asad,

I have found a work-around with Extracting and Concatenating PDF streams.

Kind regards,
Phap Nguyen

@phapnguyen

It is good to know that your issue has been resolved. We requested for a sample expected file so that we could further check whether it could also be achieved using concatenation functionality or not. Please keep using our API and feel free to create a new topic in case you face any issues.