Thanks for testing out. By looking at your code, it seems like you have assigned a file path to PDF Image and iterate in a loop.
Hi Dinesh,
Hi Dinesh,
Dim pdfDocument1 As Document = New Document()<o:p></o:p>
'r Each FilePath As String In FileNames
Dim pdfPage As Aspose.Pdf.Page = pdfDocument1.Pages.Add()
'Set margins so image will fit, etc.
pdfPage.PageInfo.Margin.Top = 0
pdfPage.PageInfo.Margin.Bottom = 0
pdfPage.PageInfo.Margin.Left = 0
pdfPage.PageInfo.Margin.Right = 0
Dim pdfImage As New Aspose.Pdf.Image()
Dim counter As Integer
For counter = 0 To 54
Console.WriteLine("--------" & counter)
pdfImage.File = fileEntries(counter)
'Add the image into paragraphs collection of the section
pdfPage.Paragraphs.Add(pdfImage)
Next
pdfDocument1.Save(“c:/pdftest/55_TIFF_Image_test.pdf”)
Hi,
Hi Dinesh,
Dim pdfDocument As Document = New Document()<o:p></o:p>
Dim pdfPage As Aspose.Pdf.Page = pdfDocument.Pages.Add()
Dim pdfImage As New Aspose.Pdf.Image()
'Set margins so image will fit, etc.
pdfPage.PageInfo.Margin.Top = 0
pdfPage.PageInfo.Margin.Bottom = 0
pdfPage.PageInfo.Margin.Left = 0
pdfPage.PageInfo.Margin.Right = 0
' Retrieve names of all the Pdf files in a particular Directory
Dim FileNames() As String = Directory.GetFiles("C:\pdftest\Copies\", "*.tif")
For Each FilePath As String In FileNames
pdfImage.File = FilePath
'Add the image into paragraphs collection of the section
pdfPage.Paragraphs.Add(pdfImage)
Next
pdfDocument.Save(“C:\pdftest\ConvertedResultant.pdf”)
Hi Dinesh,
Thanks for sharing the sample application. I have tested the application and it works fine. However, the same code not works on my sample application. I will compare the project settings with your project to better understand what causing the issue. So that’s on my plate.
- Using DOM approach - Result PDF size goes to approx 75 MB (for 55 Page which equals to 55 MB)
- Using Generator appraoch - Result PDF size goes to approx 8 MB.(for 55 Page which equals to 55 MB)
Hi Dinesh,
have logged it in our issue tracking system as PDFNEWNET-38809. We will investigate this
issue in details and will keep you updated on the status of a correction.
We apologize for your inconvenience.
The issues you have found earlier (filed as PDFNET-37460) have been fixed in Aspose.PDF for .NET 19.12.
The issues you have found earlier (filed as PDFNET-37459) have been fixed in Aspose.PDF for .NET 22.5.