Go Back   Access World Forums > Microsoft Access Discussion > Reports

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 11-21-2014, 06:34 AM   #1
selvsagt
Newly Registered User
 
Join Date: Jun 2006
Posts: 99
Thanks: 20
Thanked 1 Time in 1 Post
selvsagt is an unknown quantity at this point
Use PDF a background for report.

Hi!

I have a DB that is split to a back and frontend.

The FrontEnd is published on a Citrix server, so is the backend. It works well, but I have issues with images in report.

We have a lot of suppliers that demand that we use their standardized forms for entering customer information.

Most of these forms are quite simple and basic (logo in the corner and so on), and this does not represent an issue to just mock them in a new report.

However, one of our suppliers has multiple pictures, their own font for text, "complicated" boxes with text (for example they do not use rectangles, but cut of corner rectangles) and so on. It's a nightmare to recreate.

The FrontEnd file was about 25mb when i startet, and after creating 2 reports of 6 pages, the frontEnd size increased to over 350mb.

I have saved the pdf as an image (jpg). I need high resolution because of small tekst in the pdf that needs to be visible. I have managed to get the size down to 2mb, some 4mb. Any lower and the image is unreadable. I have also tried BMP (I've heard that bmp i preferable).

All of this is quite time consuming, and I have used hours after hours recreating these reports, without satisfactory results.

Sometimes the images are visible on the print, other times not. The same with the print preview.

I need a stable solution.
So my question is... How can I "create" a report, based on a PDF?
Any help in this matter is greatly appreciated !!!

__________________
Working on a Citrix Client using MS Access 2010 as FrontEnd and MSSql server Express 2014 as backend
selvsagt is offline   Reply With Quote
Old 11-21-2014, 07:19 AM   #2
Minty
AWF VIP
 
Minty's Avatar
 
Join Date: Jul 2013
Location: UK - Wiltshire
Posts: 6,432
Thanks: 165
Thanked 1,736 Times in 1,706 Posts
Minty is a jewel in the rough Minty is a jewel in the rough Minty is a jewel in the rough
Re: Use PDF a background for report.

You might find it easier to create the report in word - there is a merge to word report generator I used a long time ago I believe it came from Albert Kallal...

http://kallal.ca/wordmerge/index.html

From memory it took a little setting up, but gave you the flexibility of using word docs as the template for the report, directly from Access. Ideal for really difficult to get right reports.

Alternatively you could just send an electronic data file of the data to save the poor saps at the other end retyping your carefully electronically stored data . . . .
__________________
If we have helped please add to our reputation - click the scales symbol on the left, tick 'I approve' and leave a comment.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Minty is offline   Reply With Quote
The Following User Says Thank You to Minty For This Useful Post:
selvsagt (11-26-2014)
Old 11-24-2014, 11:48 AM   #3
selvsagt
Newly Registered User
 
Join Date: Jun 2006
Posts: 99
Thanks: 20
Thanked 1 Time in 1 Post
selvsagt is an unknown quantity at this point
Re: Use PDF a background for report.

Hi.
Thank you for your reply.

I have looked at kallals solution, and it seems alright. The former version of my application used excel for the same feature, and it worked really good. I assumed Access would be able to do the same, There must be some solution to this problem!

I think, however, that I might be closer to a solution by formatting the images differently. I know that bitmap is the prefered image in access, but in my case, most of the images are "mostly white spaces", and its only the text boxes that i need to work on.

First I tried to cut out the different images in the pdf as unbound images, linked images and so on. That didnt work. The images, even with dramatically reduced file size did not print. Why I have no idea. I think its difficult to read the documentation on images in access. Why does it not show on print? I am down to 900K now on the report.

Another solution I am working on right now is to use png instead of bitmap. I get the same filesize, about 900k, but still the image does not print.

In both cases the images show up in print preview, but not on the actual print, or in the pdf file i use to generate from the report.

Is there a "simple" recipe to to image handling in access?
To store the image in the db does not work. The filesize gets huge.
Should I use the activeX image control, or unbound image. Or is it some other configuration I should look at?

__________________
Working on a Citrix Client using MS Access 2010 as FrontEnd and MSSql server Express 2014 as backend
selvsagt is offline   Reply With Quote
Old 11-25-2014, 12:31 PM   #4
sxschech
Newly Registered User
 
Join Date: Mar 2010
Posts: 611
Thanks: 28
Thanked 112 Times in 101 Posts
sxschech is on a distinguished road
Re: Use PDF a background for report.

If you have the full version of adobe acrobat (not reader), it can be done with Access and VBA code. Let me know and I'll try to find the code.
sxschech is offline   Reply With Quote
The Following User Says Thank You to sxschech For This Useful Post:
selvsagt (11-26-2014)
Old 11-25-2014, 05:45 PM   #5
CJ_London
Super Moderator
 
Join Date: Feb 2013
Location: UK
Posts: 11,328
Thanks: 40
Thanked 3,667 Times in 3,536 Posts
CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light
Re: Use PDF a background for report.

I would use a jpg rather than png, store the images outside of the db in a directory and link an image control to the file.

I've attached a simple sample db to demonstrate, together with a couple of simple forms - put these forms in your C:\ directory and open report1.

The position of controls are stored in the ctrlpos table and the data in tblData, including the form to be used - you can get more sophisticated than this if required.

To set the control positions for another report, open the report in Layout view and drag each control to the required position - make a note of the top and left values and enter in the ctrlpos table, converting to twips (multiple cm x 567 or inches x 1440) - again, you can store as the actual measurement and convert in the code if you want.

Then all you need to do is output the report to a pdf.
Attached Files
File Type: zip formfiller.zip (51.6 KB, 366 views)
__________________
CJ_London
_______________________
A little thanks goes a long way. If you have found this post useful, please tick the thanks button
CJ_London is offline   Reply With Quote
The Following User Says Thank You to CJ_London For This Useful Post:
selvsagt (11-26-2014)
Old 11-25-2014, 06:26 PM   #6
Galaxiom
Super Moderator
 
Join Date: Jan 2009
Location: NSW Australia
Posts: 11,645
Thanks: 97
Thanked 1,499 Times in 1,414 Posts
Galaxiom is a splendid one to behold Galaxiom is a splendid one to behold Galaxiom is a splendid one to behold Galaxiom is a splendid one to behold Galaxiom is a splendid one to behold Galaxiom is a splendid one to behold Galaxiom is a splendid one to behold
Re: Use PDF a background for report.

Another alternative would be to print the report to pdf then use pdftoolkit to insert the original pdf as a background.
Galaxiom is offline   Reply With Quote
The Following User Says Thank You to Galaxiom For This Useful Post:
selvsagt (11-26-2014)
Old 11-25-2014, 09:28 PM   #7
accedeholdings
Newly Registered User
 
Join Date: Sep 2014
Posts: 15
Thanks: 3
Thanked 3 Times in 3 Posts
accedeholdings is on a distinguished road
Re: Use PDF a background for report.

Quote:
Originally Posted by Galaxiom View Post
Another alternative would be to print the report to pdf then use pdftoolkit to insert the original pdf as a background.

I love this solution Mr. Moderator. I think this technique is much easier.

accedeholdings is offline   Reply With Quote
Old 11-26-2014, 03:14 PM   #8
selvsagt
Newly Registered User
 
Join Date: Jun 2006
Posts: 99
Thanks: 20
Thanked 1 Time in 1 Post
selvsagt is an unknown quantity at this point
Re: Use PDF a background for report.

Thank you so very much!
The problem is now solved.

The biggest problem was actually to get the filesize small enough, but still within access limitations.

First i converted each pdf page as png. Because most of the pages are white, that eliminated a lot of the file size. I then compressed it to 150 dpi, which is 1240 pixels in width on a A4 page. I still had about 600kb pr page, and it didnt print in access, but when i then saved the image as GIF (reduced color quality, but thats ok), most of the images ended up being about 100-150kb, and the report now both preview nicely, and prints nicely. Jpg ended up to big no matter what I did. The lowest readable resoution ended in about 400kb.

I made a master report, with a subreport for each "pdf-page", inserted linked images on each sub. The biggest report was about 12 different "pdf-image" pages, and it works like a charm. I had to use 1 main report, with 2 subreport, that also had subreports. Some fidling to get it to work, but it is now stable enough, and i am quity happy i am finished with this task.
The quality of the image is not optimal, but good enough.
__________________
Working on a Citrix Client using MS Access 2010 as FrontEnd and MSSql server Express 2014 as backend
selvsagt is offline   Reply With Quote
Old 11-26-2014, 03:24 PM   #9
Galaxiom
Super Moderator
 
Join Date: Jan 2009
Location: NSW Australia
Posts: 11,645
Thanks: 97
Thanked 1,499 Times in 1,414 Posts
Galaxiom is a splendid one to behold Galaxiom is a splendid one to behold Galaxiom is a splendid one to behold Galaxiom is a splendid one to behold Galaxiom is a splendid one to behold Galaxiom is a splendid one to behold Galaxiom is a splendid one to behold
Re: Use PDF a background for report.

JPG is the most misused image format. Its name stands for Joint Photographic experts Group. Note the word "Photographic".

JPG is ONLY intended for photographs. It is entirely unsuited to line art, text and anything else with sharp changes in colour. There are many jpg renditions of cartoons and other line art online and they look terrible because they have big smudged areas around the text.

GIF has limited colour capacity. Note however you can also control the number of colours used in PNG from a lot more than a GIF can handle right down to two.
Galaxiom is offline   Reply With Quote
The Following User Says Thank You to Galaxiom For This Useful Post:
CJ_London (11-26-2014)
Old 11-26-2014, 03:45 PM   #10
CJ_London
Super Moderator
 
Join Date: Feb 2013
Location: UK
Posts: 11,328
Thanks: 40
Thanked 3,667 Times in 3,536 Posts
CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light
Re: Use PDF a background for report.

Quote:
JPG is ONLY intended for photographs. It is entirely unsuited to line art, text and anything else with sharp changes in colour
So that's why. all these years I never knew that Learn something every day
__________________
CJ_London
_______________________
A little thanks goes a long way. If you have found this post useful, please tick the thanks button

Last edited by CJ_London; 11-26-2014 at 03:46 PM. Reason: Have a new keyboard and the n key keeps sticking - it's going back
CJ_London is offline   Reply With Quote
Old 03-04-2016, 06:47 AM   #11
DucatiWiz
Newly Registered User
 
Join Date: Mar 2016
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
DucatiWiz is on a distinguished road
Re: Use PDF a background for report.

I know this is an old thread, but in case anyone else has this problem, I thought I'd share my favoured solution:

Firstly a little background, for those who don't know, there are two very different types of image file: Bitmaps and Vectors.

Bitmaps are a collection of different coloured dots and are not very suitable for printing text/lines etc as to get sharp images you have to have high resolutions and therefore larger files sizes. BMP, JPG, PNG, EPS, GIF etc are all bitmap files.

Vector files contain the text and graphics in computer code. The files tend to be much smaller and the text/graphics will be razor shape at any size when printed as the files hold mathematical "outline and fill" information within the file, not a collection of dots. Files such as WMF (windows meta files) AutoCAD images, Ai (Adobe Illustrator images) are all examples of vector image files.

Finally there are hybrid files such as PDF, which are a kind of container file which can have both bitmaps and vector files inside. Unfortunately, as you've found out, Access doesn't support these as a background image file.

My favoured solution to this is to create a vector or hybrid PDF of the form you are trying to produce. Remember that you can't just scan a paper form to PDF as that will just be a PDF file with a bitmap inside it, you need the form in text and graphic format, say from Word or Excel. There are some programs that will convert bitmap files into vector files (OCR does this) but that aren't always that accurate depending on the content.

Next you need some software which converts a PDF to a WMF (windows meta file). Adobe Illustrator does this very well.

Convert the PDF to WMF then simply set it as the background to the report. Then you can overlay the form data simply by adding fields to the report in the usual way. This gives a sharp printed form and small file size.

Hope that helps.


Last edited by DucatiWiz; 03-04-2016 at 07:15 AM.
DucatiWiz is offline   Reply With Quote
Reply

Tags
bmp , image , jpg , pdf , report

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Report Background AntB Reports 3 12-16-2011 02:25 AM
How to put report background or insert logo to a access report?? rickyfong General 1 12-02-2010 06:06 AM
Report Background? rborob Reports 2 01-17-2007 12:53 AM
background color on report twallstr Reports 1 04-06-2006 02:19 AM
Report Background bleakcabal Reports 3 04-17-2002 06:23 AM




All times are GMT -8. The time now is 11:30 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World