Jump to content

Recommended Posts

Posted

I have a receipt printer that has 3 1/8" wide thermal paper in it. I need to print a custom receipt for a customer based on some information gathered real time from a file generated by their POS. I've come to the conclusion that a formatted pdf file is the best way to do this because of the custom paper size. I have seen examples of where a pdf file can be opened and read but can I change text data in a pdf file? I am making the pdf file so I can edit however it needs to be for this project. 

Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html

Posted

Why do you need to edit existing PDF file ?
If I understand well, what you have stated, You get data from POS devices, for this case this is not important how you do it.
As I guess your are able to parse/analyze this data.

So the only one what I think you want to do is generate PDF and print them ?
If os I would sugest you to use MPDF or my QPDF UDF.
Unfortunately, the print job will use a commercial version of ActiveX Controls QuickPDF, but you can aslo use ShellExecute in the right way, and you can also use my UDF Acrobat Reader for viewing as well as printing.

Cheers,

mLipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

first, not knowing anything about your output requirements, i cannot doubt your choice of using PDF.

now, there are several UDF that can create a PDF file (not change an existing one!). look at the wiki.

Signature - my forum contributions:

  Reveal hidden contents

 

Posted

For one of my project I'm just using RTF + RTF Printer UDF (look in my signature).
You can also use WORD EXCEL or OOCalc UDF to do the same things.

 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

The printer has a paper width of 3 1/8" as I said in the original description of the problem. Receipt printers will just cut off incorrectly formatted text instead of word wrapping it. The reason I need to change data is that I have a customizable coupon form that prints for the customer based on what was purchased. Its a rewards program of sorts and I pre made a pdf file formatted to the right printing width. Imagine this:

Super Food Market

1212 Main st

Kalamazoo, MI 12345

616-123-4567

You have earned [Reward total]

to be used on your next purchase 

at super food market

 

as a template that I would replace [reward total] with a number read from another file on the POS Server. The individual dealers at the stores that would want to use this rewards program always want to customize the form. I can let them do that with a pdf file if they keep the right tags in the pdf file. Thats what Im trying to do.

Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html

Posted (edited)

how about making your PDF as a form, with an empty field you can fill programatically by Adobe Reader API? (just an idea, never checked this myself.)

EDIT: or any other PDF utility that can fill a form programatically.

Edited by orbs

Signature - my forum contributions:

  Reveal hidden contents

 

Posted (edited)

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

well someone else surely can... i read that PDFtk can fill forms.

Signature - my forum contributions:

  Reveal hidden contents

 

Posted

This is not AutoIt limitation !


You can do it very easy but you should have additional Commercial Libray to handle PDF, for Example you can use my UDF to handle QuickPDF ActiveX component.


But you can do it also with 

 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...