Rob4077
asked on
Embed a PDF file into page 2 of a report
I have been asked to create a Job Card (Report) from an existing database - done no trouble. But now they want it to find and display a plan of the location (pdf) on page 2 of the report (must be page 2 because it has to print on the reverse side of a double-sided form). I can programatically work out the location of the plan (P:\CustomerName\JobNum\Si tePlan.pdf ) easily so all I need to work out is how what object type I need to use and how to set it up so that the pdf will display on page 2 of the report. A complication is that the plan is in A3 and the form it needs to print on is A4 so it needs to be scalable. Is this possible and if so how?
ASKER
Hi Jeff, you said "use a utility to "batch convert" the PDF's to images". Where would I find such a batch utility? I may be able to get VBA to initiate the conversion, include the image in the report, then delete the created image.
There are many, ...you can do a Google search:
https://www.google.com/?gws_rd=ssl#q=batch+convert+PDF+to+image
The kicker here is that if the PDF's need to be "Updated" regularly, ...then you need to keep converting them as well.
but lets go back a bit.
Conversion is not needed at all, if you tried using a form.
https://www.google.com/?gws_rd=ssl#q=batch+convert+PDF+to+image
The kicker here is that if the PDF's need to be "Updated" regularly, ...then you need to keep converting them as well.
but lets go back a bit.
Conversion is not needed at all, if you tried using a form.
ASKER
Hi Jeffrey, Sorry I missed your last comment until now. So are you suggesting that I convert my report to a form, then use a webbrowser control on the form that points to the PDF, then use the Page break control to display the PDF on the second page? Doing it that way, means I only lose the CanGrow Can Shrink functionality - makes sense. And a web browser control will display a PDF I assume? I will give it a go.
ASKER
Hi Jeffrey, I created a form, used a webbrowser control and the form displays correctly with the PDF image. Here's the code I used on the draft form to get it to display the PDF on screen perfectly.
Forms![frmJobCard].WebBrow ser0.Navig ate2 ("P:\Aussie Living\2 Sansimeon Byford\1413146_1100719.pdf ")
However when I print or print preview the webcontrol just displays and prints as a frame with nothing in it. How do I get around that?
Forms![frmJobCard].WebBrow
However when I print or print preview the webcontrol just displays and prints as a frame with nothing in it. How do I get around that?
what version of Windows/Office are you running?
ASKER
Office 2013 (some PCs running 2013 Runtime Office) on Windows 7
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for taking time to try to help. At least I know. Appreciate the effort
You can do it in a form by using a webbrowser control and pointing it to the PDF file.
...but not in a report.
Alternatives:
1. You can try using the adobe sdk/vba libraries, ...but documentation may be scarce.
http://www.adobe.com/devnet/acrobat/downloads.html
2. You can use a utility to "batch convert" the PDF's to images, ..then the image of the PDF can easily be displayed on the report.
3. Print the form instead of the report. Then, again, you can use a webbrowser control on the form that points to the PDF, then use the Page break control to display the PDF on the second page. Note the with this technique, ...it may be hard to control how the form Prints.
Let me know...
JeffCoachman