Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    EddieN1 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    May 2011
    Posts
    316

    How to Print a Report on a pdf Image


    I'm sure there is a simple way to do this and, if there is, you guys/gals will know how to do it. I want to store a blank, application pdf file on a shared drive and then when I print the report, call it up as the background image. The end result is that it will print on plain, white paper, but will appear as if it was printed on the pdf image, in color and with company logo, etc.

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,441
    I think you're probably thinking about this a bit backward you can tell me if I'm wrong.

    The Problem: You want to output a report from your MS access application to a PDF file, but you want that PDF file to have a background image. The Effect would be something like you were printing on company letterhead.

    I don't think (someone can correct me if I'm wrong) you can use a template file with the docmd.outputto and a PDF. According to this article:

    http://msdn.microsoft.com/en-us/libr...ffice.15).aspx

    you can only use template files with HTML, ASP or HTX.

    Can you not just put your images in on the ACCESS side then use the docmd.outputto to get the effect you want?

  3. #3
    EddieN1 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    May 2011
    Posts
    316
    Let me expand... I am willing to embed the image within the Report since all the print positions are dependent on the image anyway. When I try to do this, I get a "image is too big" type of error message. What I want to do is to fill out a simple form with data from within the database. The image is a simple form with no pictures other than a black and white logo. My question is what type of image, .bmp, jpg, etc. would be most suited to this type of application? If I can save an image as, say, .bmp, is there a way to compress it so Access will accept it as an image? Thanks for your suggestions.

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    I use PNG at 150 ppi. Using a higher resolution will conflict with common printers and or Image controls in Access. You may consider 72 ppi. I start with an AI file using transparent background and then do the conversion to PNG for reports in Access. A trick I use is to publish as 150 ppi PNG and then resize the frame in the Access report to a smaller size. So publishing as 150 ppi may give me a size of 200 X 200 and publishing as 72ppi would give me somewhere around 98 X 98. I publish as 150ppi and then use a frame size in Access that = 98 X 98. This smaller frame will look at the 200 X 200 PNG file.

    If higher resolutions are needed you might try creating your own OLE object that is not an Image Control, as an alternative.

    Another option is to use Adobe Acrobat to create your reports. You can use XML to match fields in Acrobat forms. This will release you from graphic restrictions in Access reports. You might find success using an "add in" or creating VBA that uses references to DLL files in order to use "PDF Printer".
    Last edited by ItsMe; 04-11-2014 at 08:52 AM.

  5. #5
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,441
    in addition to what itsme gave you, if I am understanding your issue you have a 'standard' form that you are trying to match, for instance if you have a 'box' around a piece of information on a standard issued form that you would normally fill out by hand but you want to make your printed form with printed data look just like the original form you can do that as well. I don't think I've come across a form that was devised by someone else that I couldn't duplicate closely enough to satisfy the users. You can change the grid on your form design to match the type of spacing you need but typically 1/16th of an inch (which I think is the default) is enough to do this. I may be a bit more tedious to set up but it would work better than trying to put an image in the background to match the spaces in your data.

    Of course I may have completely misread or misinterpreted your post!

  6. #6
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    I had to go back and edit my post. I looked at some of my reports and noticed that I use PNG files not BMP. I also adjust the frame size to try and cram higher resolution into what should be "screen size" res.

    This works OK for non-formal reports but I have not found a good solution for formal letterhead other than Adobe Acrobat Pro.

  7. #7
    EddieN1 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    May 2011
    Posts
    316
    ItsMe, I would love to be able to use a pdf file as the background. How can I use Adobe Acrobat Pro or any other tools to do this? I've been trying to take a pdf file and convert it to bmp, jpg, png, etc., but Access says the picture/image is too big.

  8. #8
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    What I was describing is incorporating an image in a report that, in turn, produces a PDF file.
    To recreate a PDF form you would have to do something along the lines of what rpeare mentioned. The idea is that you do not use the PDF file. You recreate the PDF file as a report object in Access. The best way to do this is with Adobe Illustrator. If you have rights to the PDF you can open it with illustrator and publish as Word Doc and then use the resulting format to copy and paste into your Access Report object.

    You might be able to do a Save as Word Doc using Acrobat Pro too. It is difficult to make precise copies as an Access report but is probably better described as tedious after you have done it a few times.

    The typical approach is to just print the PDF form and place the printed form back into your printer. Your report then prints on the pre-printed form, like a check or letter head you order. Consider the not-so-old-school W2 forms you order and then shove into your printer.

    Having said all of that, you can use an OLE object to embed an existing PDF. I have never tried placing controls over the embedded OLE but I suppose that would be something worth looking into. If you are having troubles I believe the Wizard can help and there should be an option to link to the PDF if there is a size restriction issue. You should have the ability to do this with only Acrobat Reader installed on the OS.

    So use OLE object to get the PDF to appear in your report. Place controls (like bound textbox controls) on top of the OLE control.

  9. #9
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    I use a 263KB jpg, 1525x1860 pixels. Saved as PDF from Excel, then converted to jpg with Acrobat Pro.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  10. #10
    EddieN1 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    May 2011
    Posts
    316
    ItsMe, thanks for your help. I can embed the image in the report by putting the pathname of the png file in the Picture value in the Report properties. However, I'm having trouble printing over the image. I created a Text Box and tried to "Bring to Front", but it still doesn't show. Thoughts?

  11. #11
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    When I am adjusting layers I make the report larger than it is supposed to be. This way I can click on some white space and then select the control I want, sending the control to the back or to the front.

    I was able to create an Unbound OLE control and select Adobe Acrobat as a file type/OLE Class. I then placed controls on top of the OLE.

    Here is a DB with the PDF directly embedded. It creates an OLE that embeds the first page of the PDF. The Embedded property is read only. The problem I had with the sample is that I was not able to resize the file inside the OLE control. I was able to resize the control but the PDF was smaller than the original. I was able to use some properties for the OLE to resize the appearance of the PDF using Zoom. This made the PDF look as though it was run through an old copy machine a hundred times though.
    Attached Files Attached Files

  12. #12
    EddieN1 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    May 2011
    Posts
    316
    ItsMe, thanks for the response. I was able to use the png file after all. I first had to make my page size and the png file 8 in by 11 in. Then I was able to place a Text Box and Label on it in the fields where I wanted them to appear and it seems to be working fine now. Thanks for your help.

  13. #13
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    I would have thought that using the Adobe drivers and embedding the PDF would give better quality results than I was able to see. I guess the PNG is the way to go. I am not always satisfied with the results of the image control (PNG offers).

    I may, in the future, consider creating a custom letterhead PDF for use in Access Reports. I would create a larger than normal PDF and embed that in an unbound OLE. I create larger than normal PNG's so, for me, it would not be that much more work. So long as the PDF offers better graphic results over the PNG. Anyway, glad you have a resolution and good luck with your project(s).

  14. #14
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Quote Originally Posted by June7 View Post
    I use a 263KB jpg, 1525x1860 pixels. Saved as PDF from Excel, then converted to jpg with Acrobat Pro.
    I am going to look into those dimensions for Letter Size. Now I can't get the idea out of my head to incorporate PDF forms in Access reports. Maybe saving a PDF with those dimensions and then embedding using OLE object type Acrobat will offer the best resolution.

  15. #15
    EddieN1 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    May 2011
    Posts
    316
    I would like to open this up again because I think I can use a different approach, please advise. Since I'm running Access 2007/2010, is there a way I can use a pdf "Attachment" data type? I have defined a table with field named FormName, whose data type is "Attachment". Then I populated the table with 6 rows, each row has a different 1 page pdf file assigned to the FormName field. I then designed a Report with the table as the Record Source, and using Design, Add Existing Fields selected the FormName.FileData, .FileName, .FileType fields and dragged these onto the Report. Then I did a Save/Report View or Print Preview and I get a six page report with the Adobe Reader icon on each page. I can double click on the icon and it will take me to Adobe Reader and I can see the pdf file. However, what I want is to have the Adobe Reader interface open and show the pdf file on the report page. Am I close or still out in left field? I'm hoping that once I display the pdf file, I will be able to place text box controls on top of it and make it look like data is typed on top of the pdf form. Thanks for your help.

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 6
    Last Post: 03-01-2014, 07:07 AM
  2. Help! Header Logo Image on form won't print.
    By DjMorgan in forum Access
    Replies: 8
    Last Post: 04-29-2013, 06:46 AM
  3. Replies: 0
    Last Post: 02-22-2011, 05:04 AM
  4. print report on paper for image
    By gromit95 in forum Reports
    Replies: 11
    Last Post: 01-12-2010, 08:09 AM
  5. Print a different image per record
    By mcaldwell in forum Reports
    Replies: 5
    Last Post: 04-24-2009, 02:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums