How can i use XFAFlattener from iText in jruby? - itext

I got inspiration from https://github.com/abevoelker/pdf_ravager to create XFA Flattening. I was trying to use the XFAWorker, which is a paid version. I am trying to get the trial version to work with jRuby. XFAFlattener cannot be instantiated since it says that the class cannot be found. I added the license key as well. I am doing all the experiment in jirb.
I am assuming i dont understand how license key works. Any suggestions will be great.

Related

Azure ElasticPool "BadRequest" during creation deployment when using ARM template

I have a task where I need to use ARM template to "setup SQL server with elastic pool and 2 databases (imported from bacpac files) use Microsoft Adventureworks samples."
Most of the template I made using "101-sql-elastic-pool-create" template that is available here: https://github.com/Azure/azure-quickstart-templates/tree/master/101-sql-elastic-pool-create
I used it for the elastic pool setup and used a sample from this documentation (https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/template-tutorial-deploy-sql-extensions-bacpac) to have the .bacpac imported to the database
But when I try to deploy this template (the template is available to see here: https://github.com/KarlisAG/SQL_ARM/blob/main/azuredeploy.json ) it throws me an error
("Resource Microsoft.Sql/servers/elasticPools 'task4sql/elasticp' failed with message '{ "code": "BadRequest", "message": "An error occurred while processing this request.", "target": null, "details": [], "innererror": [] }' ")
So, the biggest problem is (besides me being an absolute newbie) not knowing what I need to fix, because there is no additional information granted, besides the "BadRequest". For deployment I used two different methods: 1) the automatically generated one from VS when created Azure resource groups, 2) One shown in this documentation, with few of my own changes, so it could work for me ( https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/template-tutorial-deploy-sql-extensions-bacpac#deploy-the-template ), from where I also got the code part for importing .bacpac to my newly created database. [Both of the are available at the same repository, named "Deploy-AzureResourceGroups.ps1" and "DeployScript.ps1" respectively].
Both of the methods return the same error.
I even manually created these things in Azure portal to see what their template looks like and maybe copy some things that are not present in my template, but from what I saw I have exactly what they automatically generate.
And when I checked the deployment status in Azure portal I can also see that during the elastic pool creation it fails: screenshot from that section available here
So does anyone know how should I have created this type of template, or did I recreate it poorly, or am I missing some small mistake that keeps blocking me?
So after multiple tries it seems that I finally figured out what I was doing wrong. I am still not sure which of the changes made a difference, besides the last one, so I will write what I changed, so other people who could be facing similar issue know what they could do fix the issue.
At first, after #stringfellow noted, I thought that Free Trial is restricting me from doing anything, but after I lowered my DTU multiple times, to the point where it was at 5 (starting from 100), the same issue persisted, so probably it was not the issue (later on I had to change it at minimum to 50). I also changed the Elastic Pool edition from Standard to Basic. But doing these changes still didn't fix the issue.
At last, after answering #NachoMartínez-Aedo comment about the api version, it got me thinking. Because in the code that I posted I used "2020-08-01-preview" api version, but in reality I used "2014-04-01-preview", because when I changed the api version of all my parts to the 2020 one, then powershell told me that (No registered resource provider found for location 'northeurope' and API version '2020-08-01-preview' for type 'servers/databases/extensions'. The supported api-versions are '2014-01-01, 2014-04-01, 2014-04-01-preview'.). And after reading through that again and remembering that when I was looking at some documentation and Azure portals automatically generated templates I knew that I always say them using the 2020 api, not the 2014, which left me confused as to why I couldn't also use the newest version. And reading that error again I saw, that it specifically told that 2020 api version was not supported for the type "servers/databases/extensions", not that all of the parts must be in 2014 version (which is what I thought when I saw that error), so I tried and changed all the 2014 back to 2020 and left the extension api back at 2014 (previously I thought that all api versions should be the same, not sure why, maybe because most of the examples and documentation had everything have the same api version) and the everything worked, even the import part, about which I was worried.
So in the future I am not too sure if there is a better/newer way to import .bacpac file to newly created database with ARM, or just have to leave it as is and in the future use this same approach. Does anyone know?
I got the import extension from here: https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/template-tutorial-deploy-sql-extensions-bacpac
, where they use examples with 2014 api for the extension, so because of that I tried to use it for all my parts, but only during this answer writing did I realize and look through it again, that they used the 2014 api only for the extension part and not other parts, like server, database, etc.
TL;DR
So basically I needed to use the '2020-08-01-preview' api for everything besides from the extension part, where the newest api version is only '2014-04-01-preview'
I was able to deploy most of your template and use similar parameters in my own subscription. I saw in your screen capture that you are using a Free Trial subscription. I am curious if that has anything to do with the 'BadRequest' due to any sort of DTU limitation.
Here is my deployment, which failed as expected when it tried to import the databases.

iTextSharp and ZUGFeRD Basic profile

I am creating ZUGFeRD PDF files with iTextSharp 5.5.9 which works fine so far. The only thing which is currently not working is the setting with the Conformance-Level.
writer = PdfAWriter.GetInstance(document, New FileStream(strFilenameOut, FileMode.Create), PdfAConformanceLevel.ZUGFeRDBasic)
or
writer.SetPDFXConformance(PdfAConformanceLevel.ZUGFeRDBasic)
won't work for me. The Metadata contains %s instead of BASIC as shown in the screenshot below.
I guess that I missed something to set. Maybe someone had the same issue and can help me to solve this issue.
Regards
Jochen
ZUGFeRD is based on the PDF/A-3 standard. You are using a method to set PDF/X conformance. PDF/A and PDF/X are two very different standards. You shouldn't set the PDF/X conformance.
Please take a look at the official documentation. I have written a book about ZUGFeRD. You can download this book as an eBook if you fill out this form: http://pages.itextpdf.com/ZUGFeRD.html
For the Basic profile, you need to take a look at Chapter 5. There are many examples available online.
This is how it's done in Java:
PdfAWriter writer = PdfAWriter.getInstance(document,
new FileOutputStream(dest), PdfAConformanceLevel.ZUGFeRDBasic);
In C#, you'll have:
PdfAWriter writer = PdfAWriter.GetInstance(document,
New FileStream(strFilenameOut, FileMode.Create), PdfAConformanceLevel.ZUGFeRDBasic)
All the examples work in Java, but recently there was a problem detected with the C# port. Maybe you are experiencing the same problem. As far as I know, this problem has been fixed in the current development version.
If you are a customer, you should ask your account manager to get a hotfix that solves this problem.

How to create an ATG store?

I have been studying ATG for about 4 months and now I am facing a problem: even going through the documentation I can't find any document that can clearly explain how I can create a new empty store.
I know that I need to have my database users and schemas, the application server scripts (I'm using weblogic) and the module in Eclipse. But I can't find anywhere how to create a new store, implement it from the beginning and see the result in the browser.
There is no such document for ATG. You either need to start from the Commerce Reference Store and customise that (in versions prior to ATG 11 would would strongly suggest not to use the CRS as your basis for a new site) or you can look at what the CRS executes for the runAssembler command, remove the CRS specific modules from that and then create, and include your own modules for the Storefront and your source code.
There is no empty store you can install and run. You have to build one. Or you can install CRS, which is not empty, but it is relatively straightforward to install and can be customized.
The documentation to follow:
http://docs.oracle.com/cd/E52191_02/CRS.11-1/ATGCRSInstall/ATGCRSInstall.pdf
https://www.sparkred.com/blog/installing-oracle-commerce-11-1-with-commerce-reference-store/
*

cocos2d-x zlib support is missing crypt.c

I just noticed that the zlib_support in cocos2d-x is missing crypt.c
I was able to update the code and add crypt.h from
http://programming-practice.googlecode.com/svn/trunk/LevelUp/cocos2d-x/cocos2d-1.0.1-x-0.11.0/cocos2dx/platform/third_party/marmalade/zlib/contrib/minizip/crypt.h
to the project to get it working but I would like to know why this functionality is removed from the framework in the first place? Is there an alternative to the crypt.h I have used?
I finally found out the reason.
When you go on to publish your app, you are required to disclose if you are using encryption or not. And if your answer is yes, then there are separate and significantly longer process of approval. Adding encryption into cocos2d-x would therefore result in long approval times for a large number of apps. Hence it's not included.
http://cheminf20.org/2011/08/29/releasing-an-ios-app-using-encryption-first-time/

How to use omnigroup framework in an iOS project?

I need to be able to write and read from a rtf file in iOS.
The omnigroup framework has the 2 classes i am looking for :
OmniUI/iPad/RTF/OUIRTFReader
OmniUI/iPad/RTF/OUIRTFWriter
I managed to build the frameworks but i cant figure out how to integrate theses classes in my own project.
I had the following frameworks to my project :
OmniAppKit.framework
OmniFoundation.framework
OmniBase.framework
I still get some undefined identifier such as :
RCS_ID("$Id$");
OBINITIALIZE
OMNI_POOL_START
Has anybody been able to use the omnigroup framework in your own project ?
Thanks,
Vincent
We do need some better documentation for this, but the TextEditor example app in OmniUI/iPad/Examples/TextEditor may be a good starting point for seeing how we include the frameworks in our apps.
In this particular case, you may prefer to pull out the OUIRTFReader class and any dependencies it needs from OmniAppKit and OmniFoundation into your project. updating the #imports to be "..." instead of <OmniThis/AndOmniThat.h>.
Perhaps you could try following the instructions given as part of this thread on the Omni Group forums. They appear to have been able to build the framework under the iOS 4.2 SDK.
I don't think you want the OmniAppKit framework, as that is just for the Mac.