473,396 Members | 1,970 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

print existing pdf particular page based on criteria

232 100+
i want to print existing pdf particular page based on employee id and save that id and print date in database .i somehow got the code to open and print whole pdf file.kindly help me to pass an argument to pdf file which opens and print that page only.
thanks in advance

Expand|Select|Wrap|Line Numbers
  1. Sub testpdfprint()
  2. Print_PDF ("C:\letter.pdf") 'Put your PDF in here
  3. End Sub
  4.  
  5.  
  6. Sub Print_PDF(sDocumentFullPath As String)
  7. Dim sAcrobatReaderExe As String ' full path to the Acrobat reader executable
  8. sAcrobatReaderExe = "C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe" 'Change this to where AcroRd32.exe is on your machine
  9. RetVal = Shell(sAcrobatReaderExe & " /P " & Chr(34) & sDocumentFullPath & Chr(34), 0)
  10. End Sub
Jul 8 '13 #1
2 2234
Rabbit
12,516 Expert Mod 8TB
There is no command line option to print a specific page.
Jul 8 '13 #2
zmbd
5,501 Expert Mod 4TB
Perhaps the following documentation will help:

Parameters for Opening PDF Files
(...)The parameters for URLs are supported by most browsers, and can be used when opening PDF documents programmatically.
Many of these parameters can be passed to the following core API functions (see the Acrobat and PDF Library API Reference for details):
AVDocOpenFromFileWithParamString
AVDocOpenFromASFileWithParamString
AVDocOpenFromPDDocWithParamString
When opening a PDF document from a command shell, you can pass the parameters to the open command using the /A switch with the following syntax:
<Acrobat path> /A "<parameter>=<value>" "<PDF path>"
For example:
Acrobat.exe /A "zoom=1000" "C:\example.pdf"
In Mac OS, you can use the parameters when opening a PDF document with an Apple event.(...)
Jul 8 '13 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Steve | last post by:
Hi; I'm making an HTML screen that I would like to print on a single page: http://www.geocities.com/beforewisdom/Tech/Archive/ebnfNotation.html Doing a print preview with Mozilla 1.6 on...
21
by: Steel | last post by:
Hi at all, I have a very long html page with many photo. Therefore the best to print this page is to print the some page as PDF. Therefore I maked a PDF file like my page to print best. I'ld want...
2
by: L Mehl | last post by:
Different users of the app will want or not want to see report footer ( appears as a separate page). I can make the section invisible with a DLookup of a Y or N value from a 'parameters' table ...
2
by: Dave | last post by:
I have an existing asp page that I would like to upgrade/convert to aspx. It gets a million or two hits per day, so I'm surmising that at a minimum I would benefit from compilation and the...
0
by: magic man | last post by:
I have written an application in VB.Net using server side controls. I realize that I need client side controls to print anything at the clients computer. I have a web page that consists of a 1...
1
by: Paolo matador | last post by:
Hi All, i have a little problem with my web application. I need to print a web page, shrinked on a thermal printer that not supporting A4 format. The printer is this:...
1
by: vj | last post by:
How i can populate all fileds dynamically in jsp page based on contents found in xml file? I have written jsp servlets and java class file. i transferred automatic data from jsp to servlet then to...
0
by: vijendra | last post by:
How i can populate all fileds dynamically in jsp page based on contents found in xml file?I have written jsp servlets and java class file. i transferred automatic data from jsp to servlet then to...
0
coolv
by: coolv | last post by:
Hello everyone, I have problem with getting a print of page in my application(ASP>NET,C#). I have reciept page in my application.in this page a data which i want to print comes from...
0
by: Joseph O | last post by:
I am trying to get my entire print.css to print out fluently throughout the pages. Unfortunately, I did not create this and I am trying to modifying it to work correctly. As you can see in the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.