|
Rank: Advanced Member Groups: Member
Joined: 7/18/2008 Posts: 76
|
Good Afternoon,
Does you EO.PDF object allow you to save a PDF document as a TIFF?
Thank you,
Darrell
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,200
|
Yes. You can do that. You will need to set this property to true first: http://www.essentialobjects.com/doc/4/eo.pdf.htmltopdfoptions.generatepageimages.aspxAfter that you will get an array of System.Drawing.Image object each representing one page. You can then do whatever with those images. If you have an early build, then make sure you update to the latest build first. This property did not exist in early builds. Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 7/18/2008 Posts: 76
|
Good Morning,
I have been reading more about your HTMLtoPDF.ConvertUrl() and trying to convert an EXISTING PDF to a tiff image and I am coming up short.
I am not needing to convert an HTML document to a pdf and then save it as a tiff image, I need to convert an exising PDF to a TIFF.
In searching you site, I have not found that the HTMLtoPDF can accomplish this, correct?
Thank you for your help.
Darrell
|
|
Rank: Advanced Member Groups: Member
Joined: 7/18/2008 Posts: 76
|
Below is a sample of what I am trying to accomplish (I took this from your samples project in EO.PDF samples. I am needing to load an existing PDF document and break it into individual pages which the below code is able to, however, when I go to save that page, I need to convert it to a TIFF image. Is this possible? Thank you for your time.
Code: Visual Basic.NET
'Get the file name
Dim filePath As String = args.GetString("txtFileName").Trim()
If filePath = String.Empty Then
Return "Please enter a valid file name."
End If
If Not File.Exists(filePath) Then
Return "The specified PDF file does not exist."
End If
'Get the from page index and page count
Dim fromPage As Integer = -1
Dim pageCount As Integer = -1
Try
fromPage = Integer.Parse(args.GetString("txtFrom"), CultureInfo.InvariantCulture)
pageCount = Integer.Parse(args.GetString("txtCount"), CultureInfo.InvariantCulture)
Catch
Return "Either the from page index or the page count is invalid."
End Try
'Load the PDF file
Dim doc As New PdfDocument(filePath)
'Check page index range
If (fromPage < 0) OrElse (fromPage >= doc.Pages.Count) Then
Return String.Format("From page index must be between 0 and {0}.", doc.Pages.Count - 1)
End If
'If page count is invalid, then extract
'till the last page
If (pageCount < 0) OrElse (fromPage + pageCount > doc.Pages.Count) Then
pageCount = -1
End If
'Create a new PdfDocument object that only
'contains the pages to be extracted
Dim doc2 As PdfDocument = doc.Clone(fromPage, pageCount)
'Save the new PdfDocument into a file. This
'file will only contain the specified pages
doc2.Save(outputFileName)
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,200
|
Hi,
You can not convert an existing PDF file to images with EO.Pdf. You can only get the page images if you are creating PDF through our HTML to PDF converter. We have a HTML render that render HTML, which is part of the HTML to PDF converter. We do not have a PDF render.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 7/18/2008 Posts: 76
|
Thank you. Is there any plans to provide this functionality in future releases?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,200
|
No. A PDF render is much more complicated than you thought. Adobe Reader is basically a PDF render and it's a 100M+ downloads. It requires a lot of code and data (particular font data). So it's not something on our list for now.
Thanks!
|
|