Same image multiple times in one document

Hi there,
I'm a software developer, and currently the system I'm working on produces postscript documents for invoices/orders etc. and I'm looking for a way to reduce the size of the postscript file.  One simply way would be to re-use the same image (company logo, for example), rather than specifying it again for every page.
The images are produced using the linux tool ps2pdf - the output is then chopped up so it literally only has the image producing code, and then dumped as-is into the document where the image is required.  What I'd like to do is put this postscript image into a procedure, then call it with the height, width, x and y position whenever I need it.  Doing this will drastically reduce down the PS file from MB sizes to KB sizes.
This is an example of how the documents are currently produced: Postscript multiple images - Pastebin.com
This is an example of what I thought would work, with the image inside a procedure: Postscript multiple images - with procedure - Pastebin.com
(These aren't actually real documents, just an example of how it works!)
Can anyone help me to get the second example working?  Essentially, I copied the image producing code into a procedure, and then I'm trying to call it.  No matter what I try, it doesn't want to play - the error I'm getting in Ghostscript is "/syntaxerror in --%ztokenexec_continue--".  What I can find on the web about this error doesn't help - I'm not particularly experienced with postscript, so please be nice!
Thanks in advance!
John

And for why it doesn't work... typical image definitions look like this
parameters including "currentfile" image
lines of image data
What happens when this is executed is that the interpreter puts the parameters on the stack, then calls image. Image reads from its source, currentfile, which is exactly the same source used to execute operands and operators. When image has finished, it stops reading currentfile and the interpreter will resume.
Now, when a procedure is defined the input is tokenised, put in an array, and this is saved for later use.
When a procedure is executed, the operands and operators in the array are repeated almost as if they were found in the input. But this is false security, because it breaks down with inline data. If you put the lines above in a procedure, then EACH TIME the procedure is executed it will read from currentfile - and the current position is probably the call to the procedure. In fact, you can define a procedure like the above but leave out the lines of inline data. Include the lines of inline data after each call and it will read the image each time, but this does not help with your aim.
This was very tricky to solve before ReusableStreamDecode, which allows you to turn any section of your input into a file to be used over and over - it becomes currentfile. This was invented for level 3 PostScript.

Similar Messages

  • How to automate saving the same image multiple times?

    Hello. I wish to save the same image multiple times in a folder... is there a way to automate this function? I also need the flexibility of determining the starting number in this image sequence. Thanks.

    Good day!
    I would recommend asking for help over at
    Photoshop Scripting
    And going into more detail about what you want to achieve (maybe post a screenshot, diagram, mock-up to illustrate it).
    Regards,
    Pfaffenbichler

  • Loading the same image multiple times

    I'm trying to dynamically load a single image multiple times
    into flash. Basically I want to end up with two movieclips mc1 and
    mc2 that contain the image. I'm currently using the Loader
    component (connected to the ProgressBar) to dynamically load the
    image. It works fine for loading the image once but I'm really not
    sure how to go about creating a second movie clip with the image.
    Here's my code for loading the first image:
    var mc1:MovieClip = new MovieClip();
    var listener:Object = new Object();
    listener.complete = function(eventObj:Object){
    nextFrame();
    imageLoader.addEventListener("complete", listener);
    mc1 = imageLoader.content;
    imageLoader.load(imgURL);
    But everything I've tried to load mc2 with that same image
    has failed. I've tried 'mc2 = imageLoader.content', 'mc2 = mc1',
    'attachMovie', 'duplicateMovieClip', calling imageLoader.load()
    twice on the imgURL, and creating a second Loader component and
    loading the image again. All of these methods have invariably
    failed. Most of them can load mc1 alright and sometimes mc2 even
    shows up on the stage but in the AS mc2 is always undefined.
    Can anybody point me in the right direction for loading
    multiple copies of the same image? It really shouldn't be that
    hard, should it?

    Well I figured out a solution. Turns out Flash doesn't allow
    you to duplicate dynamically loaded content like an image in a
    movieclip. But there is a little class called BitmapData that will
    do precisely what I was looking for. Here's the link I got this
    info from:
    http://www.senocular.com/flash/source.php?id=0.174

  • Printing the same page multiple times on one sheet

    So last year I wanted to print out minature versions of my card design and I was able to do that by printing out multiple copies of the same thing on one sheet of paper. Of course that was a while ago and now today I can't do the same thing. I remember printing the same page(copy) multiple times either in acrobat or indesign. I see that I have a front and back version for last years card and I'm assuming I must have done it in acrobat. Last year when I looked at the preview there was multiple copies of my page. This year I only see 1 even as I choose the other things. At first I thought it might have been the version I was using on my windows as opposed to the version on my mac. But now I'm on my mac and I still don't see how I did it last year. Please help! I keep reading that this can't be done but I remember doing the same thing last year. It was the 16 copies of the same thing option. I tried it again this time but it doesn't work. I tried printing the 4 copies only 1 copy was printed.(the preview didn't even show all copies like last year) The verson of acrobat is X. version 10.1.4

    What exact version of iPhoto 9 are you using? Version 9.5's solution will be different from the solution for earlier versions of iPhoto 9.
    OT

  • Printing same photo multiple times on one contact sheet

    I am trying to figure out how to make multiple copies of one photograph when I select it for printing on my personal computer. What can I do instead of making multiple copies of the photo in order to make it print more than once on the page? Let me know if you need further information to help me!

    To add a little more info to Androcles post, check out the page from iPhoto support
    Printing your own photos and greeting cards.
    Lori

  • [JS][CS3] Place the same image multiple times?

    I have a javascript that processes a set of multiple-choice test items in XML.  The XML structure identifies parts of the item such as intro, question, answer choice A, answer choice B, etc.
    I have a small AI file for each answer choice that has a fill-in-the-bubble circle with the letter A, B, C, or D inside.  The part of the script that processes each answer choice has a line that does myElement.insertionPoints.item(0).place(answerBubbleFile), in other words it places the answer bubble graphic at the beginning of the answer choice.
    The problem I am having is that this ends up creating a huge INDD file and likewise huge PDFs.  The same 4 graphics are evidently being stored separately for each item, upwards of 50 items per test.
    Is there a more efficient way to do this where I could have only one copy of each graphic and have each of the places where it appears simply be a reference to that one file?

    InDesign doesn't support SVG without a third party plugin.
    The problem with the file size is not because of the image, but because of the preview, so I don't think file type makes any difference...
    If the graphic is a simple vector, you can try pasting from Illustrator as native InDesign paths. Those don't have preview images.
    Harbs

  • If you make a picture in pages.... how do i duplicate the image on the same page multiple times????????!!!!

    If I make a little picute in pages ... HOW DO I DUPLICATE THE IMAGE MULTIPLE TIMES ON THE SAME PAGE!11?????!!!!

    Or you can hold down the Option key while you click on the image and drag to create a copy. Then Select All and repeat. Repeat again, each time doubling your image count. You may, at an early stage, want to align your photos so that they will be in position when you Option-Drag the next set.
    Walt

  • Is it possible to copy the same database multiple times simultaneously?

    This is the setup of my environment.
    I have a 'master' database that contains the full schema plus some pre-populated data such as default settings. When database schema changes are made, they get made to the master database. When a new customer signs up for the service, I make a copy of this
    master database (using SMO) that will now be the database containing all of the customer's information. The database is rather large, and the copy operation can take a couple minutes.
    Everything works fine as expected, unless I try to provision two new customers at the same time. It appears that Azure only allows for one DB copy operation at a time. Is there a way to allow for copying the same database multiple times simultaneously?
    Thanks for you input. I understand that this is likely not the optimal setup, and that there is many better ways of doing this, but I am somewhat heavily invested in the current process and I would like to find out how to make it work if I can.

    BTW, you can do this programatically by using PowerShell (https://msdn.microsoft.com/en-us/library/ee210569.aspx), SqlPackage (http://www.benday.com/2012/12/18/deploy-a-sql-server-database-projects-dacpac-with-sqlpackage-exe/)
    or the SQL Server binaries for .NET (http://www.vijayt.com/Post/Deploying-a-data-tier-application-in-SQL-Azure-programatically)
    Hope this helps.
    Alex

  • How to print the same picture multible times on one page

    how can i print the same picture multible times on one page
    Message title was edited by: Brett N

    Select all of the images you would like to print in the Elements Organizer, then go to File > Print. In Step 4, choose Picture Package from the drop-down menu. In Step 5, click the option to Fill Page with First Photo.

  • Multiple Vendors for one Document Number in BW

    Hello All,
    We are getting Multiple Vendors for one document in BW. In R/3, standard table and RSA3, we are able to see correct vendor where as when it is coming into BW it is showing incorrect vendor in PSA and Data Target.
    All issues are coming for Process Key 1 only.
    *For Example:*
    Document: 9400000007
    Schedule Line:1
    Doc Item: 1
    Vendor:
    0010019229 - Incorrect Vendor
    0010018962 - Correct Vendor
    Committed Quantity: 0
    Doc Type:
    ZNB
    ZNPP
    Process Key: 1
    Not sure how to upload screen shot.
    Please suggest.
    Thanks,
    Vijay

    Hi ,
    Are you loading for the first time ? If yes have you checked Transaction BF11 settings.
    Regards
    Rahul Bindroo

  • Address book has same entries multiple times how can I go back to original cesium

    Address book has same entries multiple times how can I go back to original cesium

    After a couple of days, I'm noticing that the repeat(ing) offenders have more than 10 episodes, and seem to keep repeating them every time I sync.
    They only show once in my phone and in the iTunes Podcasts, but through iTunes and looking at what's in my phone is when I see the repeats.
    Even after I've marked a podcast as played, and deleted it from within my phone, as well as telling iTunes to delete the played episodes, it still shows multiples of the played episodes.
    There doesn't seem to be any rhyme or reason to it either. They aren't the newest ones either.

  • Scanning multiple pages in one document

     I am trying to scan multiple pages in one document.  I am using a HP Envy 4501 All-in-one and running Windows 8.1.  I used to be able to do this at one point but for some reason, lately I am not able to.  I have read other posts that spoke of a "+" sign on the left side of the screen, but it is not there for me.  Also, I cannot just save the page and scan the next without having to save them under different file names.  Please advise.
    This question was solved.
    View Solution.

    Hi,
    From the HP Software click on Scan a Document or Photo and ensure the Sow Scan Preview is checked.
    Reduce the Scan Resolution into 300 or a lower resolution and press on Scan, then the add button should appear again.
    Shlomi
    Say thanks by clicking the Kudos thumb up in the post.
    If my post resolve your problem please mark it as an Accepted Solution

  • Scanning multiple pages as one document

    When I was using Windows XP with my HP 3055 I could scan multiple pages as one document.  Since I have upgraded to Windows 7 Pro, when I scan, each page is scanned as a new document.  Also, I no longer have the option to scan the document as a pdf.   The pdf problem is not that important, but it is very important to be able to scan multiple pages as one document.  How can I make my HP scan all pages as one document?
    Thank you.

    Hi @flyrod40 ,
    I see that you would like to be able to scan multiple pages to one file. I would be happy to help you.
    What printer do you have? Deskjet 3050 or the Laserjet 3050.
    How Do I Find My Model Number or Product Number?
    If you are using the HP Scan Software, open the software, select the link for Advanced Settings, then click on the File tab and put a check mark in Create a separate file for each scanned page. This will allow you to scan multiple pages to one file.
    Here are the screen shots.
    Hope this helps.
    Have a nice day!
    Thank You.
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!
    Gemini02
    I work on behalf of HP

  • Can i install itunes multiple times on one computer for multiple users?

    Can i install itunes multiple times on one computer for multiple users?

    Like most applications you only need to install it once for it to be available to all users. (That said it is possible to install an application and only make it available to the current user, but that's rarely needed.)
    tt2

  • Why is Apple TV showing the same computer multiple times for Home Sharing?

    Why is my Apple TV showing the same computer multiple times for Home Sharing? Also have connectivity issues. Sometimes will lose signal.
    JonRod's music
    JonRod's music
    JonRod's music
    JonRod's music
    JonRod's music
    I recently updated to Yosemite and never had this issue before.

    I'm not 100% sure of the ins and outs, but it's some sort of known issue between Yosemite, Airport and wifi. All you can do is wait for a fix and keep restarting your equipment as and when needed, unless you have the ability to connect your Mac via ethernet.

Maybe you are looking for

  • Help with a schema

    I an trying to create a schema to get an Excel workbook into xml so I can take that information and make a member list in inDesign CS6 so I don't have to type it by hand. When I bring the schema into Excel I get the XML Error dialogue box. The descri

  • AppleScript to 'eject' iPod after copying is done.  Need a trick!

    I'd like my AppleScript to eject my iPod Shuffle after it is done copying podcasts to it. Unfortunately, the 'duplicate' command is "asynchronous", meaning that it returns immediately, without waiting for the copies to complete. More unfortunately, i

  • How often should DBMCLI be run on our production XI system???

    Good morning, XI Experts. Our consultant setup this job to run weekly on our XI 2.0 system.  Problem is that during the 4-5 hours that this job is running our polling adapters experience HTTP 500 Timeout errors and no data is able to be input into XI

  • Mac OS X 10.6.8 to OS X Mountain Lion possible?

    I have a late 2010 macbook air with Mac OS X 10.6.8, Was wondering what do I need to be able to download the new OS X Mountain Lion? Thanks Grace x

  • The new JFileChooser...

    i think that the new JFileChooser in 1.4 is great, however, the only thing that i can see should change in the default/java look and feel is the system icons, it doesn't matter what system you are on you should still be able to see the systems defaul