Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!
![]() |
Need to Convert PS to PDF |
Post Reply
|
| Author | |
stevengupta
Beginner
Joined: 27 Dec 10 Location: Va Status: Offline Points: 2 |
Post Options
Thanks(0)
Quote Reply
Topic: Need to Convert PS to PDFPosted: 27 Dec 10 at 6:10PM |
|
I am trying to convert out a postscript file to a PDF file.
I am using the code below. When it comes to the save portion I end up with a blank PDF file. Any ideas? Public Sub ConvertPS(ByVal PsFile As String) Dim OutputPDF As String Dim psReader As String OutputPDF = Replace(UCase(PsFile), ".PS", ".PDF") If File.Exists(OutputPDF) Then Kill(OutputPDF) End If Dim objSR As New StreamReader(PsFile) psReader = objSR.ReadToEnd objSR.Close() Dim PDFLibrary As QuickPDFAX0723.PDFLibrary PDFLibrary = CreateObject("QuickPDFAX0723.PDFLibrary") If PDFLibrary.UnlockKey("YOUR KEY HERE!") = 1 Then Dim psO = PDFLibrary.NewPostScriptXObject(psReader) Dim i = PDFLibrary.DrawPostScriptXObject(psO) PDFLibrary.SaveToFile(OutputPDF) PDFLibrary.RemoveDocument(PDFLibrary.SelectedDocument) End If PDFLibrary = Nothing End Sub |
|
![]() |
|
BEvans
Beginner
Joined: 07 Nov 10 Status: Offline Points: 5 |
Post Options
Thanks(0)
Quote Reply
Posted: 30 Dec 10 at 5:56PM |
|
Embedding raw postscript in a PDF isn't the same as converting a PS file
to a PDF. Some PDF viewers won't even show it. In general you print
such files to a PDF virtual printer of some kind or use Acrobat
Distiller / GhostScript or something equivalent on them directly.
Some links that might be useful: Using Acrobat Distiller to convert PS to PDF Tools to convert to/from PS |
|
![]() |
|
stevengupta
Beginner
Joined: 27 Dec 10 Location: Va Status: Offline Points: 2 |
Post Options
Thanks(0)
Quote Reply
Posted: 01 Jan 11 at 7:23PM |
|
Thanks for the reply.
I think you are saying that quick pdf will not convert a ps file to a PDF file. I was previously using acrobat distiller com object, but after moving from 8.0 to acrobat 9.0 the distiller com object does not work correctly unless the user running the command is actually logged into the terminal server. Under 8.0 it didn't require that. |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store