Create Pdf File From Vb6 Shell

Create pdf file from vb6 shell free

This article contains code samples to Create File using VBScript, and commands to Create File in Powershell and Command Line (cmd). Environment: Visual Basic 6 When it comes to generating reports in software systems, most users want these reports to be printed as an Adobe Portable Document Format (PDF) file, which is is normally a read-only format so that users can't change the contents of it.Most customers will ask that your report be printed in PDF format.

Hello.
The task :
Using multiple commands like :
I generate some text file.
For readiness I must insert page break.
When the program is finished I want to convert the final text file to a pdf file.
When finished, I got two files : One text file and One pdf file.
When printing both, you cannot differentiate them.
What I have done :
I build a single groff base file by copying data :
First I initialize the base document with :
Then I fill the base file with the result of :
Then I build the pdf file like this :
Problem N°1
The page break is always at line 67.
I tried to change page length with :
With different value but the page break arise always at the same place.
So How to change the page break.
Problem N°2
I want to use different fonts type and size.
This will certainly affect the presentation of the document.
How to fix the problem of page breaks.
Problem N°3
How to set page length by lines/per page ?
Problem N°4
With enscript you can explicitly set page format, font, ...
--lines-per-page= ?
--margins=?:?:?:?
--font=?
--media=?
This may contradict the presentation of the document generated by groff.
Problem N°5
I have look after hundreds of web page and I have not found a good tutorial to help me is that task that should be simple.
Any help is welcome.
  • Points
    802
    Posts
    114

    Hi all


    I'm using Excel 2010 and have Adobe Reader 11.


    I'm trying to make a code in VBA that can print a specific PDF file. It's OK if the file opens first but it not necessary.


    The file name change from time to time but it’s written in a specific cell in Excel. Let us say that it’s A1 in sheet1. The path is the same every time so that can be written directly in the code.


    I have found this code on WWW but it doesn’t work for me.


    1. Option Explicit
    2. Public Declare Function ShellExecute Lib 'shell32.dll' Alias 'ShellExecuteA' ( _
    3. ByVal hwnd As Long, _
    4. ByVal lpOperation As String, _
    5. ByVal lpFile As String, _
    6. ByVal lpParameters As String, _
    7. ByVal lpDirectory As String, _
    8. ByVal nShowCmd As Long) As Long
    9. Public Function PrintThisDoc(Formname As Long, FileName As String)
    10. On Error Resume Next
    11. Dim X As Long
    12. X = ShellExecute(Formname, 'Print', FileName, 0&, 0&, 3)
    13. End Function
    14. Sub testPrint()
    15. Dim printThis
    16. Dim strDir As String
    17. Dim strFile As String
    18. strDir = 'J:KALMachinesExtruder IKøredataTegninger'
    19. strFile = '370_Rev.pdf'
    20. printThis = PrintThisDoc(0, strDir & strFile)
    21. End Sub
    Display More


    Bahut pyar karte hai ringtone download

    Jo bheji thi dua mp3 download 320kbps mr jatt. I do hope that someone can help me.


    Thank you in advance

    1. Navigation
    2. OzGrid
    3. Forum
    4. Members
    5. Options
    6. Current Location
    This site uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
    Your browser has JavaScript disabled. If you would like to use all features of this site, it is mandatory to enable JavaScript.