I downloaded the msi for aspose.pdf and ran install. I have VS 2017 Community. I would like to learn and review Aspose.PDF. How do I do that? Step by Step. Please include menu selections on VS. This is for a dummy. Thank you for any help help.
In case you have installed Aspose.PDF for .NET via MSI installer, you may find DLLs over path like ‘C:\Program Files (x86)\Aspose’ and include reference in your Visual Studio project. Furthermore, please note that you can also install Aspose.PDF for .NET via NuGet Package Manager. By following the instructions given over shared documentation article, you can easily install and use API in your environment.
In case you are asking about registering assembly in Global Assembly Cache (GAC), we would like to share with you that MSI Installer does not do that. You can register assembly manually in case you want to by following the instructions over How to install the assembly into GAC article. In case of any further assistance, please feel free to let us know.
You may please download example project of Aspose.PDF for .NET from GitHub which includes every example showcased in API documentation. For further information, please visit ‘How to Run Examples’ article(s) in API documentation. In case you need further assistance, please feel free to let us know.
In case you are using Aspose.PDF in Classic ASP and need to use many of the Aspose.Pdf Classes, you may create a COM Wrapper. For further information in this regard, you may please visit following article:
Please note that not all classes of the API can be exported to TLB as they are generic. After running the command, you will also be able to see the list of classes which are not exported.TLB_Errors.png (14.2 KB)
In order to create a COM Wrapper, you may please:
Create a Class Library Project in Visual Studio
Add reference to latest version of Aspose.PDF for .NET
Create methods in your Class which you want to use in ASP Application
You can use any location for registering the assembly where DLL is placed. Looking at your sample location, it seemed that you have added the assembly in GAC (Global Assembly Cache). In case you want to use it from cache location, you can register it from there as well. In case you face any issue, please feel free to let us know.
The Aspose.PDF for .NET supports both 32-bit and 64-bit architectures. However the MSI Installer places the assembly in Program Files (x86) folder and assemblies present there can be used for both architectures. Furthermore, we will be changing the installer logic soon and it will be installing the DLLs in Program Files in near future.
You can create PDF file using XML template and XML template should be based on XML Schema support by the API. You may please find examples given in API documentation over following link:
Would you please make sure that you have signed the assemblies of your COM Wrapper project using public/private key. Also, please make sure to add complete assembly information by going to Project->Properties->Application Tab->Assembly Information (Button).
Furthermore, please remove the unused namespaces from COM Wrapper Class and build your project again. Please note that, after rebuilding the project, you need to register COM Wrapper assemblies again using regasm command. In case of any issue, please feel free to let us know.
I hope all is well. I have registered Aspose.PDF and have the following in the C:\Program Files (x86)\Aspose\Aspose.PDF for .NET\bin\net2.0\ folder:
Just a reminder that I am using WIndows 10, developing in Classic ASP, and on my local machine. I ran the following code and everything seems to work fine.
Set doc = Server.CreateObject("Aspose.Pdf.Document")
Set lic = CreateObject("Aspose.PDF.License")
response.write ( doc.Pages.Count )
I am curios though, what else can do in classic ASP. I mean, can I read a pdf file and insert a paragraph of text into the PDF. Overall, my needs are simple: (1) read a single page PDF document, (2) insert a paragragh,(3) insert a photo, (4) and save the document.
I noticed there is no Aspose.PDF.tlb. Does ComComponent functionally replace Aspose.PDF.tlb? Please explain.
I also had some errors in the regasm… is this expected? I will attach the output errors.
All Aspose.PDF exportable classes are exported into ComComponent except those which are generic. Which was why, you noticed some errors after running the command.
You may try adding/writing methods in your COM Wrapper project and use them in your Class ASP project. For example, if you need to create a PDF and save it to a location, you can create a method like following:
public class Test
public void SavePDF(string outputPath)
Document doc = new Document();
And use it in Classic ASP as:
Dim pdfHelper Set pdfHelper = CreateObject("SampleWrapperAspose.Test")
For information regarding other functionalities, please visit following useful articles in API Documentation:
I have this working with classic ASP and a COM Wrapper. Can you help me with some basic programming using classic ASP and a COM Wrapper. I am not quite sure how to proceed. Here is what I want to do.
1. Open a PDF document via a path ( **this is a one page PDF** )
2. Overlay some text (centered at row x, between column y1 and y2) on the opened PDF .
I want to pass the coordinates and the text from classic ASP to the COM Wrapper.
3. Overlay a picture in (centered at top x, between column y1 and y2)
4. Save the PDF to a output file
Here is my attempt at the Classic ASP Code
Set pdfHelper = CreateObject("SampleWrapperAspose.Test")
pdfHelper.readDocument( "c:\path\to\the_input_file.pdf" )
pdfHelper.placeCenteredText( 10, 100, 300, "Lorem Ipsom Text" )
pdfHelper.placeCenteredPicture( 14, 100, 400, "c:\path\to\the_input_photo.jpg" )
pdfHelper.SaveDocument( "c:\path\to\the_output_file.pdf" )
SET pdfHelper = Nothing
Here is my COM WRAPPER template.
How do I open a pdf and keep it open while changing it within classic asp?
Not sure how to pass numbers for the coordinates?
public class Test